mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
filter_map_bool_then
This commit is contained in:
parent
575398134e
commit
c27b6b5308
2 changed files with 4 additions and 7 deletions
|
@ -174,7 +174,6 @@ derived_hash_with_manual_eq = "allow"
|
||||||
field_reassign_with_default = "allow"
|
field_reassign_with_default = "allow"
|
||||||
forget_non_drop = "allow"
|
forget_non_drop = "allow"
|
||||||
format_collect = "allow"
|
format_collect = "allow"
|
||||||
filter_map_bool_then = "allow"
|
|
||||||
if_same_then_else = "allow"
|
if_same_then_else = "allow"
|
||||||
large_enum_variant = "allow"
|
large_enum_variant = "allow"
|
||||||
match_like_matches_macro = "allow"
|
match_like_matches_macro = "allow"
|
||||||
|
|
|
@ -400,9 +400,8 @@ impl GenericParams {
|
||||||
params
|
params
|
||||||
.type_or_consts
|
.type_or_consts
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|(idx, param)| {
|
.filter(|(idx, _)| enabled((*idx).into()))
|
||||||
enabled(idx.into()).then(|| param.clone())
|
.map(|(_, param)| param.clone())
|
||||||
})
|
|
||||||
.collect()
|
.collect()
|
||||||
}),
|
}),
|
||||||
lifetimes: all_lifetimes_enabled
|
lifetimes: all_lifetimes_enabled
|
||||||
|
@ -411,9 +410,8 @@ impl GenericParams {
|
||||||
params
|
params
|
||||||
.lifetimes
|
.lifetimes
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|(idx, param)| {
|
.filter(|(idx, _)| enabled((*idx).into()))
|
||||||
enabled(idx.into()).then(|| param.clone())
|
.map(|(_, param)| param.clone())
|
||||||
})
|
|
||||||
.collect()
|
.collect()
|
||||||
}),
|
}),
|
||||||
where_predicates: params.where_predicates.clone(),
|
where_predicates: params.where_predicates.clone(),
|
||||||
|
|
Loading…
Reference in a new issue