Skip to content

Commit

Permalink
Derive Ord, PartialOrd for Pid
Browse files Browse the repository at this point in the history
  • Loading branch information
ranweiler committed Mar 3, 2020
1 parent 207d892 commit 2ff30d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2ff30d8

Please sign in to comment.