Skip to content

Conversation

@sorairolake
Copy link
Contributor

@sorairolake sorairolake commented Nov 10, 2025

This pull request adds a method to the unsigned NonZero<T> that return the minimum number of bits required to represent a value.

This can be achieved by using the get method and the methods added in #142328, but I think adding the NonZero::bit_width method is useful because it accomplishes the same thing a little more succinctly.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants