We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75a457d commit f42c801Copy full SHA for f42c801
library/core/src/time.rs
@@ -794,7 +794,7 @@ impl Duration {
794
without modifying the original"]
795
#[inline]
796
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
797
- #[ensures(|duration| !duration.is_some() || duration.unwrap().is_safe())]
+ #[ensures(|duration| duration.is_none() || duration.unwrap().is_safe())]
798
pub const fn checked_mul(self, rhs: u32) -> Option<Duration> {
799
// Multiply nanoseconds as u64, because it cannot overflow that way.
800
let total_nanos = self.nanos.0 as u64 * rhs as u64;
0 commit comments