diff options
Diffstat (limited to 'crates/ide_assists/src/handlers/replace_if_let_with_match.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/replace_if_let_with_match.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_assists/src/handlers/replace_if_let_with_match.rs b/crates/ide_assists/src/handlers/replace_if_let_with_match.rs index aee880625..9404aa26d 100644 --- a/crates/ide_assists/src/handlers/replace_if_let_with_match.rs +++ b/crates/ide_assists/src/handlers/replace_if_let_with_match.rs | |||
@@ -169,7 +169,7 @@ pub(crate) fn replace_match_with_if_let(acc: &mut Assists, ctx: &AssistContext) | |||
169 | } | 169 | } |
170 | 170 | ||
171 | fn is_pat_wildcard_or_sad(sema: &hir::Semantics<RootDatabase>, pat: &ast::Pat) -> bool { | 171 | fn is_pat_wildcard_or_sad(sema: &hir::Semantics<RootDatabase>, pat: &ast::Pat) -> bool { |
172 | sema.type_of_pat(&pat) | 172 | sema.type_of_pat(pat) |
173 | .and_then(|ty| TryEnum::from_ty(sema, &ty)) | 173 | .and_then(|ty| TryEnum::from_ty(sema, &ty)) |
174 | .map(|it| it.sad_pattern().syntax().text() == pat.syntax().text()) | 174 | .map(|it| it.sad_pattern().syntax().text() == pat.syntax().text()) |
175 | .unwrap_or_else(|| matches!(pat, ast::Pat::WildcardPat(_))) | 175 | .unwrap_or_else(|| matches!(pat, ast::Pat::WildcardPat(_))) |