diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-17 17:22:32 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-17 17:22:32 +0100 |
commit | ce926aebc4461e38535047958c0b6f72b7a0c0ea (patch) | |
tree | 4b844e0681b459836bac22c34bee43e4dfa3dc5f /crates/ide/src/references.rs | |
parent | 3ae0c5911ab50ee209179ee4329b0551abe6fc48 (diff) | |
parent | 02d25ab60d2701ce71fe2dfaca36627ad902e229 (diff) |
Merge #9315
9315: Nest all the or-patterns! r=Veykril a=Veykril
`cargo +nightly clippy --fix -Z unstable-options --allow-dirty -- -A clippy::all -D clippy::unnested_or_patterns`
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide/src/references.rs')
-rw-r--r-- | crates/ide/src/references.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 945c9b9e1..5808562a7 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs | |||
@@ -79,8 +79,7 @@ pub(crate) fn find_all_refs( | |||
79 | }); | 79 | }); |
80 | usages.references.retain(|_, it| !it.is_empty()); | 80 | usages.references.retain(|_, it| !it.is_empty()); |
81 | } | 81 | } |
82 | Definition::ModuleDef(hir::ModuleDef::Adt(_)) | 82 | Definition::ModuleDef(hir::ModuleDef::Adt(_) | hir::ModuleDef::Variant(_)) => { |
83 | | Definition::ModuleDef(hir::ModuleDef::Variant(_)) => { | ||
84 | refs.for_each(|it| { | 83 | refs.for_each(|it| { |
85 | it.retain(|reference| { | 84 | it.retain(|reference| { |
86 | reference.name.as_name_ref().map_or(false, is_lit_name_ref) | 85 | reference.name.as_name_ref().map_or(false, is_lit_name_ref) |