mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-03 01:16:14 +03:00
fmt
This commit is contained in:
@@ -79,7 +79,9 @@ pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<(
|
||||
|
||||
let number_of_arguments = generics
|
||||
.iter()
|
||||
.filter(|param| matches!(param, hir::GenericParam::TypeParam(_) | hir::GenericParam::ConstParam(_)))
|
||||
.filter(|param| {
|
||||
matches!(param, hir::GenericParam::TypeParam(_) | hir::GenericParam::ConstParam(_))
|
||||
})
|
||||
.count();
|
||||
let fish_head = std::iter::repeat("_").take(number_of_arguments).collect::<Vec<_>>().join(",");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user