Mark Duration::is_zero as rustc_const_stable.
This commit is contained in:
parent
d1e23b8af8
commit
b44ae964e2
@ -280,6 +280,7 @@ impl Duration {
|
|||||||
/// assert!(!Duration::from_secs(1).is_zero());
|
/// assert!(!Duration::from_secs(1).is_zero());
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "duration_zero", since = "1.53.0")]
|
#[stable(feature = "duration_zero", since = "1.53.0")]
|
||||||
|
#[rustc_const_stable(feature = "duration_zero", since = "1.53.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn is_zero(&self) -> bool {
|
pub const fn is_zero(&self) -> bool {
|
||||||
self.secs == 0 && self.nanos == 0
|
self.secs == 0 && self.nanos == 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user