Skip to content

Commit

Permalink
Fix tests for checked_duration_since
Browse files Browse the repository at this point in the history
  • Loading branch information
vi committed Feb 13, 2019
1 parent 7b2a08c commit d15c358
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libstd/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ impl Instant {
/// # Examples
///
/// ```no_run
/// #![feature(checked_duration_since)]
/// use std::time::{Duration, Instant};
/// use std::thread::sleep;
///
Expand Down Expand Up @@ -653,7 +654,8 @@ mod tests {
#[test]
fn checked_instant_duration_nopanic() {
let a = Instant::now();
(a - Duration::new(1, 0)).checked_duration_since(a);
let ret = (a - Duration::new(1, 0)).checked_duration_since(a);
assert_eq!(ret, None);
}

#[test]
Expand Down

0 comments on commit d15c358

Please sign in to comment.