Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/utils/suggest_name.rs')
-rw-r--r--crates/ide-assists/src/utils/suggest_name.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide-assists/src/utils/suggest_name.rs b/crates/ide-assists/src/utils/suggest_name.rs
index b4c6cbff2a..78dee24a6d 100644
--- a/crates/ide-assists/src/utils/suggest_name.rs
+++ b/crates/ide-assists/src/utils/suggest_name.rs
@@ -185,10 +185,10 @@ fn normalize(name: &str) -> Option<String> {
}
fn is_valid_name(name: &str) -> bool {
- match ide_db::syntax_helpers::LexedStr::single_token(name) {
- Some((syntax::SyntaxKind::IDENT, _error)) => true,
- _ => false,
- }
+ matches!(
+ ide_db::syntax_helpers::LexedStr::single_token(name),
+ Some((syntax::SyntaxKind::IDENT, _error))
+ )
}
fn is_useless_method(method: &ast::MethodCallExpr) -> bool {