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 d4bd7f7 commit 75a457dCopy full SHA for 75a457d
library/core/src/time.rs
@@ -737,7 +737,7 @@ impl Duration {
737
without modifying the original"]
738
#[inline]
739
#[rustc_const_stable(feature = "duration_consts_2", since = "1.58.0")]
740
- #[ensures(|duration| !duration.is_some() || duration.unwrap().is_safe())]
+ #[ensures(|duration| duration.is_none() || duration.unwrap().is_safe())]
741
pub const fn checked_sub(self, rhs: Duration) -> Option<Duration> {
742
if let Some(mut secs) = self.secs.checked_sub(rhs.secs) {
743
let nanos = if self.nanos.0 >= rhs.nanos.0 {
0 commit comments