Skip to content

feat!: remove redefinition of arithmetic methods on BigNumTrait#84

Merged
TomAFrench merged 6 commits intomainfrom
ab/BigNumTrait_parent_traits
Jan 3, 2025
Merged

feat!: remove redefinition of arithmetic methods on BigNumTrait#84
TomAFrench merged 6 commits intomainfrom
ab/BigNumTrait_parent_traits

Conversation

@asterite
Copy link
Copy Markdown
Contributor

Description

Problem

While working on having Noir require traits to be in scope I noticed this new error pops up in a usage of this library:

image

We could import the corresponding trait, but I realized the traits here maybe meant to have Add, Neg, etc., as parent traits except that until recently it was impossible.

As a bonus, now we can use +, -, etc. with big nums.

Summary

Additional Context

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@asterite
Copy link
Copy Markdown
Contributor Author

Oh, it seems tests run against 0.36.0 which didn't have parent traits (or, well, did in the syntax, but didn't do anything with them) so right now it's impossible to move this PR forward.

@asterite asterite requested a review from TomAFrench January 2, 2025 12:57
Comment thread Nargo.toml
@TomAFrench
Copy link
Copy Markdown
Member

Closes #34

@TomAFrench TomAFrench changed the title chore: use parent traits feat!: remove redefinition of arithmetic methods on BigNumTrait Jan 2, 2025
@TomAFrench TomAFrench merged commit b5c6ce2 into main Jan 3, 2025
@TomAFrench TomAFrench deleted the ab/BigNumTrait_parent_traits branch January 3, 2025 22:46
@github-actions github-actions bot mentioned this pull request Jan 3, 2025
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.

Use supertraits in order to avoid duplication of arithmetic operations.

2 participants