Skip to content

Commit

Permalink
Compare self with ROOT constant in is_root() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kixunil committed Jun 30, 2017
1 parent c0655aa commit dd8ce7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Uid {

/// Returns true if the `Uid` represents privileged user - root. (If it equals zero.)
pub fn is_root(&self) -> bool {
self.0 == 0
*self == ROOT
}
}

Expand Down

0 comments on commit dd8ce7d

Please sign in to comment.