crypto: Simplify the Instant substraction.

master
Damir Jelić 2020-08-10 16:53:15 +02:00
parent d7bcf42a2b
commit 6593cce778
1 changed files with 1 additions and 5 deletions

View File

@ -307,11 +307,7 @@ mod test {
assert!(!alice.timed_out()); assert!(!alice.timed_out());
assert!(alice_machine.outgoing_to_device_messages.is_empty()); assert!(alice_machine.outgoing_to_device_messages.is_empty());
alice.set_creation_time( alice.set_creation_time(Instant::now() - Duration::from_secs(60 * 15));
Instant::now()
.checked_sub(Duration::from_secs(60 * 15))
.unwrap(),
);
assert!(alice.timed_out()); assert!(alice.timed_out());
assert!(alice_machine.outgoing_to_device_messages.is_empty()); assert!(alice_machine.outgoing_to_device_messages.is_empty());
alice_machine.garbage_collect(); alice_machine.garbage_collect();