Added Ord and Hash as derived traits for tokio::time::Instant (#2239)

The added derived traits mirror the traits of std::time::Instant. As
tokio::time::Instant is just a wrapper around std::time::Instant, it
should also derive all the traits std::time::Instant derives.
This commit is contained in:
Tudor Sidea
2020-02-17 11:18:19 -05:00
committed by GitHub
parent 09b5f47381
commit 41576e6c48
+1 -1
View File
@@ -6,7 +6,7 @@ use std::time::Duration;
/// A measurement of the system clock, useful for talking to
/// external entities like the file system or other processes.
#[derive(Clone, Copy, Eq, PartialEq, PartialOrd)]
#[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)]
pub struct Instant {
std: std::time::Instant,
}