Skip to content

Commit

Permalink
fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
alpire authored and jaemk committed Nov 23, 2020
1 parent 5890765 commit e210c99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 2 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,12 @@ impl Status {

/// Returns `true` if `Status::UpToDate`
pub fn uptodate(&self) -> bool {
match *self {
Status::UpToDate(_) => true,
_ => false,
}
matches!(*self, Status::UpToDate(_))
}

/// Returns `true` if `Status::Updated`
pub fn updated(&self) -> bool {
match *self {
Status::Updated(_) => true,
_ => false,
}
matches!(*self, Status::Updated(_))
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ impl UpdateStatus {

/// Returns `true` if `Status::UpToDate`
pub fn uptodate(&self) -> bool {
match *self {
UpdateStatus::UpToDate => true,
_ => false,
}
matches!(*self, UpdateStatus::UpToDate)
}

/// Returns `true` if `Status::Updated`
Expand Down

0 comments on commit e210c99

Please sign in to comment.