Skip to content

Commit

Permalink
Merge #1189
Browse files Browse the repository at this point in the history
1189: Derive `Ord`, `PartialOrd` for `Pid` r=posborne a=ranweiler

Closes #1188.

Co-authored-by: Joe Ranweiler <joe@lemma.co>
  • Loading branch information
bors[bot] and ranweiler committed Mar 3, 2020
2 parents 2a40283 + 2ff30d8 commit 837fb44
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 837fb44

Please sign in to comment.