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

Allow more integer types when creating Instants #272

Closed
wants to merge 1 commit into from

Commits on Jan 27, 2019

  1. Allow more integer types when creating Instants

    This allows any type that can be converted into an `i64` to be used when
    creating an Instant. Because this is no longer a concrete type, this
    change may break existing code like the following:
    
        error: attempt to multiply with overflow
           --> src/time.rs:282:37
            |
        282 |         epoc = Instant::from_millis(2085955200 * 1000).into();
            |                                     ^^^^^^^^^^^^^^^^^
            |
            = note: #[deny(const_err)] on by default
    crawford committed Jan 27, 2019
    Configuration menu
    Copy the full SHA
    bd63e4e View commit details
    Browse the repository at this point in the history