Rollup merge of #82179 - mbartlett21:patch-5, r=joshtriplett
Add functions `Duration::try_from_secs_{f32, f64}`
These functions allow constructing a Duration from a floating point value that could be out of range without panicking.
Tracking issue: #83400
This commit is contained in:
@@ -597,6 +597,9 @@ impl Error for char::ParseCharError {
|
||||
#[unstable(feature = "try_reserve", reason = "new API", issue = "48043")]
|
||||
impl Error for alloc::collections::TryReserveError {}
|
||||
|
||||
#[unstable(feature = "duration_checked_float", issue = "83400")]
|
||||
impl Error for core::time::FromSecsError {}
|
||||
|
||||
// Copied from `any.rs`.
|
||||
impl dyn Error + 'static {
|
||||
/// Returns `true` if the boxed type is the same as `T`
|
||||
|
||||
Reference in New Issue
Block a user