Skip to content

Commit

Permalink
Revert "fix clippy::match_like_matches_macro in either_or_both"
Browse files Browse the repository at this point in the history
This reverts commit f598ad4.
  • Loading branch information
JoJoJet committed Jul 5, 2022
1 parent 97a8b39 commit b1271d1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/either_or_both.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ impl<A, B> EitherOrBoth<A, B> {
/// If `Left`, return true. Otherwise, return false.
/// Exclusive version of [`has_left`](EitherOrBoth::has_left).
pub fn is_left(&self) -> bool {
matches!(self, Left(_))
match *self {
Left(_) => true,
_ => false,
}
}

/// If `Right`, return true. Otherwise, return false.
/// Exclusive version of [`has_right`](EitherOrBoth::has_right).
pub fn is_right(&self) -> bool {
matches!(self, Right(_))
match *self {
Right(_) => true,
_ => false,
}
}

/// If `Both`, return true. Otherwise, return false.
Expand Down

0 comments on commit b1271d1

Please sign in to comment.