summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/unistd.rs2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f28b6f8c..d31a09aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added `unistd::setfsuid` and `unistd::setfsgid` to set the user or group
identity for filesystem checks per-thread.
(#[1163](https://github.com/nix-rust/nix/pull/1163))
+- Derived `Ord`, `PartialOrd` for `unistd::Pid` (#[1189](https://github.com/nix-rust/nix/pull/1189))
+
### Changed
### Fixed
### Removed
diff --git a/src/unistd.rs b/src/unistd.rs
index 904c1c81..64873635 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -115,7 +115,7 @@ impl fmt::Display for Gid {
///
/// Newtype pattern around `pid_t` (which is just alias). It prevents bugs caused by accidentally
/// passing wrong value.
-#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Pid(pid_t);
impl Pid {