Skip to content

Commit dd74c7c

Browse files
authored
task: implement Ord for task::Id (#7530)
1 parent 2326323 commit dd74c7c

File tree

1 file changed

+1
-1
lines changed
  • tokio/src/runtime/task

1 file changed

+1
-1
lines changed

tokio/src/runtime/task/id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::{fmt, num::NonZeroU64};
1616
/// [`task::id()`](crate::task::id()) functions and from outside the task via
1717
/// the [`JoinHandle::id()`](crate::task::JoinHandle::id()) function.
1818
#[cfg_attr(docsrs, doc(cfg(all(feature = "rt"))))]
19-
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq)]
19+
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, PartialOrd, Ord)]
2020
pub struct Id(pub(crate) NonZeroU64);
2121

2222
/// Returns the [`Id`] of the currently running task.

0 commit comments

Comments
 (0)