Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hansihe
Copy link
Contributor

@hansihe hansihe commented Aug 17, 2019

This has been one of the major annoyances for me when using num-bigint compared to something like rug.

@cuviper
Copy link
Member

cuviper commented Aug 30, 2019

On the surface this seems fine, although I wouldn't include the signed primitives with BigUint.

I'm concerned about what this does to type inference though, shown by the changes you had to make to existing tests. I think technically this is a minor breaking change according to Rust semver, which is allowable but deserves caution.

I think we'll probably have a semver bump in the near future for rand (#75), so it might be better to wait for that and document this as an upgrade hazard.

@hansihe
Copy link
Contributor Author

hansihe commented Oct 10, 2019

I removed the signed integer implementations for BigUint.

@birkenfeld
Copy link

+1 for this patch. I was wondering why Add etc. are implemented but not the comparison traits.

@cuviper cuviper mentioned this pull request Jan 10, 2020
7 tasks
bors bot added a commit that referenced this pull request Mar 2, 2020
136: impl PartialEq and PartialOrd with primitives r=cuviper a=cuviper

This rebases and extends #105 (cc @hansihe). As noted before, it may hurt type inference where callers use comparison operators that relied on only one possible `impl` before. We're on the way to 0.3 though, so even a relatively minor break like that is perfectly allowable.

Co-authored-by: Hans Elias B. Josephsen <[email protected]>
Co-authored-by: Josh Stone <[email protected]>
@cuviper
Copy link
Member

cuviper commented Mar 2, 2020

Included in #136.

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.

3 participants