-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add more const constructors and various convenience functions to Number for generic conversions #47
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ff04aa6
Add more const constructors and various convenience functions to Numb…
danlehmann 0af7307
Fix compile errors
danlehmann aed856f
Fix some range checking bugs
danlehmann 3be1efc
Clarify compile time asserts, give them cleaner error messages
danlehmann 8e84b27
Improve comments; work in new assert_unchecked in the various getters
2405504
Add as_usize()
c1fa55e
Add inline_const to const_convert_and_const_trait_impl (which is need…
danlehmann cb6b171
Update changelog, bump version
danlehmann f885cba
Incorporate naming feedback
danlehmann 97081a8
Fix test names
danlehmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "arbitrary-int" | ||
version = "1.2.7" | ||
version = "1.3.0" | ||
edition = "2021" | ||
authors = ["Daniel Lehmann <[email protected]>"] | ||
description = "Modern and lightweight implementation of u2, u3, u4, ..., u127." | ||
|
@@ -15,7 +15,9 @@ std = [] | |
|
||
# Supports const trait implementation through const_convert and const_trait_impl. Support for those was removed | ||
# from more recent Rust nightlies, so this feature requires an older Rust compiler | ||
# (2023-04-20 is broken, 2022-11-23 works. The exact day is somewhere inbetween) | ||
# (2023-04-20 is broken, 2022-11-23 works. The exact day is somewhere inbetween). | ||
# As of 12/2/2024, this also uses inline_const. This has been stabilized but is required for current code to work | ||
# on the old compiler. | ||
const_convert_and_const_trait_impl = [] | ||
|
||
# core::fmt::Step is currently unstable and is available on nightly behind a feature gate | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danlehmann With 1.3.0 being incompatible to previous versions anyway and
inline_const
having been stabilized in Rust 1.79.0, may it be a good time to raise the MSRV to 1.79 and just remove this optional feature?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is still used by https://crates.io/crates/bilge (which itself puts it behind an optional feature). While I really dislike the code duplication, I don't want to break them. I think the right time to remove the feature is when const_convert/const_trait become finalized.
In terms of breakage, I think 1.3.0 doesn't break much. I'd like to keep it at a minimum.