Skip to content

deep copy of aMatrix#40

Merged
oursimon merged 2 commits intomainfrom
feature/90/recivers-structs
Dec 18, 2025
Merged

deep copy of aMatrix#40
oursimon merged 2 commits intomainfrom
feature/90/recivers-structs

Conversation

@oursimon
Copy link
Copy Markdown
Contributor

@oursimon oursimon commented Dec 17, 2025

Description

Changed the copy function for rulesets. Now the aMatrix get deep copied to avoid unintended bugs and enable several queries with the same ruleset.

How Has This Been Tested?

Please describe how this change is tested.

  • Integration tests

Checklist:

  • My code follows the style guidelines
  • I have performed a self-review of my code
  • I have commented my code (where needed)
  • My changes generate no new warnings
  • Tests are added for relevant functions
  • New and existing unit tests pass locally with my changes

return ruleset
}

func Test_tmp(t *testing.T) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old garbage.

@oursimon oursimon requested a review from boscar December 17, 2025 11:51
@@ -0,0 +1,94 @@
package solve
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT? Are these two tests redundant?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to keep 1 of them to just have a check that we don't mutate the ruleset when creating a solution.

@@ -0,0 +1,94 @@
package solve
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to keep 1 of them to just have a check that we don't mutate the ruleset when creating a solution.

@oursimon oursimon force-pushed the feature/90/recivers-structs branch from d5e8230 to aa3c3c9 Compare December 18, 2025 20:25
@oursimon oursimon merged commit ab9f6f3 into main Dec 18, 2025
3 checks passed
@oursimon oursimon deleted the feature/90/recivers-structs branch December 18, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants