Unnamed repository; edit this file 'description' to name the repository.
concise filtering
| -rw-r--r-- | crates/ide_assists/src/handlers/add_turbo_fish.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ide_assists/src/handlers/add_turbo_fish.rs b/crates/ide_assists/src/handlers/add_turbo_fish.rs index 12d9a9de6d..e493e4e192 100644 --- a/crates/ide_assists/src/handlers/add_turbo_fish.rs +++ b/crates/ide_assists/src/handlers/add_turbo_fish.rs @@ -79,10 +79,7 @@ pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<( let number_of_arguments = generics .iter() - .filter(|param| match param { - hir::GenericParam::TypeParam(_) | hir::GenericParam::ConstParam(_) => true, - _ => false, - }) + .filter(|param| matches!(param, hir::GenericParam::TypeParam(_) | hir::GenericParam::ConstParam(_))) .count(); let fish_head = std::iter::repeat("_").take(number_of_arguments).collect::<Vec<_>>().join(","); |