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 functions Duration::try_from_secs_{f32, f64} #82179

Merged
merged 2 commits into from
Jun 15, 2021

Commits on Jun 14, 2021

  1. Add functions Duration::try_from_secs_{f32, f64}

    This also adds the error type used, `FromSecsError` and its `impl`s.
    mbartlett21 committed Jun 14, 2021
    Configuration menu
    Copy the full SHA
    c2c1ca0 View commit details
    Browse the repository at this point in the history
  2. Use try_from_secs_* in Duration::from_secs_* functions.

    `Duration::from_secs_{f32, f64}` now use the results from the
    non-panicking functions and unwrap it.
    mbartlett21 committed Jun 14, 2021
    Configuration menu
    Copy the full SHA
    7803955 View commit details
    Browse the repository at this point in the history