We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b2a08c commit d15c358Copy full SHA for d15c358
src/libstd/time.rs
@@ -224,6 +224,7 @@ impl Instant {
224
/// # Examples
225
///
226
/// ```no_run
227
+ /// #![feature(checked_duration_since)]
228
/// use std::time::{Duration, Instant};
229
/// use std::thread::sleep;
230
@@ -653,7 +654,8 @@ mod tests {
653
654
#[test]
655
fn checked_instant_duration_nopanic() {
656
let a = Instant::now();
- (a - Duration::new(1, 0)).checked_duration_since(a);
657
+ let ret = (a - Duration::new(1, 0)).checked_duration_since(a);
658
+ assert_eq!(ret, None);
659
}
660
661
0 commit comments