Unnamed repository; edit this file 'description' to name the repository.
minor: Remove pointless rebindings
Lukas Wirth 2022-04-07
parent 96b641e · commit 3632d59
-rw-r--r--crates/hir/src/source_analyzer.rs4
-rw-r--r--crates/hir_ty/src/lower.rs2
-rw-r--r--crates/ide/src/hover.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs
index c9eb134e94..89ba16d087 100644
--- a/crates/hir/src/source_analyzer.rs
+++ b/crates/hir/src/source_analyzer.rs
@@ -344,7 +344,7 @@ impl SourceAnalyzer {
}
None
})();
- if let resolved @ Some(_) = resolved {
+ if let Some(_) = resolved {
return resolved;
}
@@ -389,7 +389,7 @@ impl SourceAnalyzer {
let builtin = name_ref.as_ref().and_then(|name_ref| {
BuiltinAttr::by_name(db, self.resolver.krate().into(), &name_ref.text())
});
- if let builtin @ Some(_) = builtin {
+ if let Some(_) = builtin {
return builtin.map(PathResolution::BuiltinAttr);
}
return match resolve_hir_path_as_macro(db, &self.resolver, &hir_path) {
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs
index 81134f666b..373196969a 100644
--- a/crates/hir_ty/src/lower.rs
+++ b/crates/hir_ty/src/lower.rs
@@ -1046,7 +1046,7 @@ fn named_associated_type_shorthand_candidates<R>(
),
_ => None,
});
- if let res @ Some(_) = res {
+ if let Some(_) = res {
return res;
}
// Handle `Self::Type` referring to own associated type in trait definitions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 23b995dbb8..ae9be8adbd 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -152,7 +152,7 @@ pub(crate) fn hover(
let res = descended
.iter()
.find_map(|token| hover_type_fallback(sema, config, token, &original_token));
- if let res @ Some(_) = res {
+ if let Some(_) = res {
return res;
}
}