Skip to content

Commit

Permalink
Allow clippy match_like_matches_macro
Browse files Browse the repository at this point in the history
The matches! macro that clippy suggested was only stabilized in 1.42
(2020-03-12). Allowing this clippy lint prevents projects using older
versions of rust from breaking going forward.

See also: GH-27
  • Loading branch information
dcroote committed Jan 27, 2021
1 parent 52f7873 commit 43d5d6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/strand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ impl Strand {
}
}

#[allow(clippy::match_like_matches_macro)]
impl PartialEq for Strand {
/// Returns true if both are `Forward` or both are `Reverse`, otherwise returns false.
fn eq(&self, other: &Strand) -> bool {
Expand All @@ -72,6 +73,7 @@ impl Neg for Strand {
}
}

#[allow(clippy::match_like_matches_macro)]
impl Same for Strand {
fn same(&self, s1: &Self) -> bool {
match (*self, *s1) {
Expand Down

0 comments on commit 43d5d6a

Please sign in to comment.