Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/db.rs')
-rw-r--r--crates/hir-def/src/db.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir-def/src/db.rs b/crates/hir-def/src/db.rs
index d25d41c2cf..c9789ceb20 100644
--- a/crates/hir-def/src/db.rs
+++ b/crates/hir-def/src/db.rs
@@ -259,10 +259,8 @@ fn crate_supports_no_std(db: &dyn DefDatabase, crate_id: CrateId) -> bool {
None => continue,
};
- let segments = tt.split(|tt| match tt {
- tt::TokenTree::Leaf(tt::Leaf::Punct(p)) if p.char == ',' => true,
- _ => false,
- });
+ let segments =
+ tt.split(|tt| matches!(tt, tt::TokenTree::Leaf(tt::Leaf::Punct(p)) if p.char == ','));
for output in segments.skip(1) {
match output {
[tt::TokenTree::Leaf(tt::Leaf::Ident(ident))] if ident.text == "no_std" => {