mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user