Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

asterite
Copy link
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
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
Nargo.toml Show resolved Hide resolved
@TomAFrench
Copy link
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
5 checks passed
@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