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

impl TryFrom from native to NonZero #72846

Closed
wants to merge 3 commits into from

Commits on Jun 1, 2020

  1. impl TryFrom from native to NonZero

    You can now do the following:
    
        ```
        let p: u8 = 5;
        let q: NonZeroU8 = p.try_into()?;
        ```
    
        Which improves API design a bit nicer.
    heca-project authored Jun 1, 2020
    Configuration menu
    Copy the full SHA
    69eea45 View commit details
    Browse the repository at this point in the history
  2. Update src/libcore/num/mod.rs

    Remove not needed unsafe
    
    Co-authored-by: kennytm <kennytm@gmail.com>
    heca-project and kennytm authored Jun 1, 2020
    Configuration menu
    Copy the full SHA
    1adb74b View commit details
    Browse the repository at this point in the history
  3. Removed a whitespace

    heca-project authored Jun 1, 2020
    Configuration menu
    Copy the full SHA
    03b23e9 View commit details
    Browse the repository at this point in the history