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

Add From<NonZero*> impls for wider NonZero types #66196

Closed
newpavlov opened this issue Nov 7, 2019 · 6 comments
Closed

Add From<NonZero*> impls for wider NonZero types #66196

newpavlov opened this issue Nov 7, 2019 · 6 comments
Assignees
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@newpavlov
Copy link
Contributor

newpavlov commented Nov 7, 2019

For example in getrandom to convert NonZeroU16 to NonZeroU32 we have to write code like this:

num::NonZeroU32::new(e.get() as u32).unwrap().into()

Instead of using a simple e.into().

This issue has been assigned to @peter-wilkins via this comment.

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Nov 7, 2019
@Dylan-DPC-zz
Copy link

@rustbot claim @peter-wilkins

@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2019

Error: Parsing assign command in comment failed: ...tbot claim|error: expected end of command at >| @peter-wi...

Please let @rust-lang/release know if you're having trouble with this bot.

@Dylan-DPC-zz
Copy link

@rustbot assign @peter-wilkins

@rustbot rustbot self-assigned this Nov 13, 2019
@c3st7n
Copy link
Contributor

c3st7n commented Nov 16, 2019

Opened a PR for this (#66479), but I just noticed it was supposed to be assigned to @peter-wilkins, aplogies I hadn't noticed this.

@c3st7n
Copy link
Contributor

c3st7n commented Nov 16, 2019

I must have branched from an old commit or similar, will fix.

Edit: I had branched off some very old code by mistake, fixed this and force pushed.

bors pushed a commit that referenced this issue Dec 10, 2019
@newpavlov
Copy link
Contributor Author

Fixed in #66277.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants