Skip to content

T should implement From<NonZeroT> #54171

Closed
@orlp

Description

@orlp

I'd really expect this to just work:

let nz = NonZeroU32::new(5).unwrap();
let k: u32 = nz.into();

All NonZeroT types should implement From<NonZeroT> for T, as this conversion is always possible and free.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions