crypto: Simplify the Instant substraction.
parent
d7bcf42a2b
commit
6593cce778
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue