diff options
author | Tudor Sidea <tudor.sidea@gmail.com> | 2020-02-17 18:18:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 11:18:19 -0500 |
commit | 41576e6c48c38e0d8418997defb7413484a5c5c5 (patch) | |
tree | 2e0ac376c192888d1b75287130ab29c930d33680 /tokio/src | |
parent | 09b5f47381dba99e1fcf666e0639cff627048ad2 (diff) |
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.
Diffstat (limited to 'tokio/src')
-rw-r--r-- | tokio/src/time/instant.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tokio/src/time/instant.rs b/tokio/src/time/instant.rs index ebe991d0..f2cb4bc9 100644 --- a/tokio/src/time/instant.rs +++ b/tokio/src/time/instant.rs @@ -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, } |