diff options
| author | Vitaly _Vi Shukela <vi0oss@gmail.com> | 2019-02-13 13:17:33 +0300 |
|---|---|---|
| committer | Vitaly _Vi Shukela <vi0oss@gmail.com> | 2019-02-13 13:17:33 +0300 |
| commit | d15c35800032e58c17ef1da3577dacc01ef82bb1 (patch) | |
| tree | 89d9dbce1ce22f6d16578d34ce70672255151730 /src/libstd | |
| parent | 7b2a08cf494563c1867200cd994193d1855719f2 (diff) | |
| download | rust-d15c35800032e58c17ef1da3577dacc01ef82bb1.tar.gz rust-d15c35800032e58c17ef1da3577dacc01ef82bb1.zip | |
Fix tests for checked_duration_since
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/time.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 973edb5479e..eefb84f697f 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -224,6 +224,7 @@ impl Instant { /// # Examples /// /// ```no_run + /// #![feature(checked_duration_since)] /// use std::time::{Duration, Instant}; /// use std::thread::sleep; /// @@ -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] |
