blob: fff1d13720d98269bb8d7bf43e101c269104fef0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#![warn(clippy::unchecked_duration_subtraction)]
use std::time::{Duration, Instant};
fn main() {
let _first = Instant::now();
let second = Duration::from_secs(3);
let _ = _first - second;
let _ = Instant::now() - Duration::from_secs(5);
let _ = _first - Duration::from_secs(5);
let _ = Instant::now() - second;
}
|