Skip to content

Commit f42c801

Browse files
sgpthomascelinval
andauthored
Update library/core/src/time.rs
Co-authored-by: Celina G. Val <[email protected]>
1 parent 75a457d commit f42c801

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ impl Duration {
794794
without modifying the original"]
795795
#[inline]
796796
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
797-
#[ensures(|duration| !duration.is_some() || duration.unwrap().is_safe())]
797+
#[ensures(|duration| duration.is_none() || duration.unwrap().is_safe())]
798798
pub const fn checked_mul(self, rhs: u32) -> Option<Duration> {
799799
// Multiply nanoseconds as u64, because it cannot overflow that way.
800800
let total_nanos = self.nanos.0 as u64 * rhs as u64;

0 commit comments

Comments
 (0)