Skip to content

Commit 75a457d

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

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
@@ -737,7 +737,7 @@ impl Duration {
737737
without modifying the original"]
738738
#[inline]
739739
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
740-
#[ensures(|duration| !duration.is_some() || duration.unwrap().is_safe())]
740+
#[ensures(|duration| duration.is_none() || duration.unwrap().is_safe())]
741741
pub const fn checked_sub(self, rhs: Duration) -> Option<Duration> {
742742
if let Some(mut secs) = self.secs.checked_sub(rhs.secs) {
743743
let nanos = if self.nanos.0 >= rhs.nanos.0 {

0 commit comments

Comments
 (0)