Skip to content

Commit

Permalink
matches: Remove extra comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv committed Jan 26, 2022
1 parent 467a0bf commit a8fdf5c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions clippy_lints/src/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,22 +916,6 @@ fn contains_only_wilds(pat: &Pat<'_>) -> bool {

/// Returns true if the given patterns forms only exhaustive matches that don't contain enum
/// patterns without a wildcard.
///
/// For example:
///
/// ```
/// // Returns false, because the first arm contain enum without a wildcard.
/// match x {
/// (Some(E::V), _) => todo!(),
/// (None, _) => {}
/// }
///
/// // Returns true, because the both arms form exhaustive matches and without enum variants.
/// match x {
/// (Some(_), _) => todo!(),
/// (None, _) => {}
/// }
/// ```
fn form_exhaustive_matches(left: &Pat<'_>, right: &Pat<'_>) -> bool {
match (&left.kind, &right.kind) {
(PatKind::Wild, _) | (_, PatKind::Wild) => true,
Expand Down

0 comments on commit a8fdf5c

Please sign in to comment.