std: Remove the zero
constructor from Duration
This is a workaround for having to write `Zero::zero` and will be solved at the language level someday.
This commit is contained in:
parent
1666dabcbc
commit
8a5fe8655a
@ -69,12 +69,6 @@ impl Duration {
|
||||
Some(Duration { days: days, secs: secs as u32, nanos: nanos as u32 })
|
||||
}
|
||||
|
||||
/// Makes a new `Duration` with zero seconds.
|
||||
#[inline]
|
||||
pub fn zero() -> Duration {
|
||||
Duration { days: 0, secs: 0, nanos: 0 }
|
||||
}
|
||||
|
||||
/// Makes a new `Duration` with given number of weeks.
|
||||
/// Equivalent to `Duration::new(weeks * 7, 0, 0)` with overflow checks.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user