11919: minor: Remove pointless rebindings r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2022-04-06 23:34:05 +00:00 committed by GitHub
commit 134dbc6104
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -344,7 +344,7 @@ impl SourceAnalyzer {
} }
None None
})(); })();
if let resolved @ Some(_) = resolved { if let Some(_) = resolved {
return resolved; return resolved;
} }
@ -389,7 +389,7 @@ impl SourceAnalyzer {
let builtin = name_ref.as_ref().and_then(|name_ref| { let builtin = name_ref.as_ref().and_then(|name_ref| {
BuiltinAttr::by_name(db, self.resolver.krate().into(), &name_ref.text()) 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 builtin.map(PathResolution::BuiltinAttr);
} }
return match resolve_hir_path_as_macro(db, &self.resolver, &hir_path) { return match resolve_hir_path_as_macro(db, &self.resolver, &hir_path) {

View file

@ -1046,7 +1046,7 @@ fn named_associated_type_shorthand_candidates<R>(
), ),
_ => None, _ => None,
}); });
if let res @ Some(_) = res { if let Some(_) = res {
return res; return res;
} }
// Handle `Self::Type` referring to own associated type in trait definitions // Handle `Self::Type` referring to own associated type in trait definitions

View file

@ -152,7 +152,7 @@ pub(crate) fn hover(
let res = descended let res = descended
.iter() .iter()
.find_map(|token| hover_type_fallback(sema, config, token, &original_token)); .find_map(|token| hover_type_fallback(sema, config, token, &original_token));
if let res @ Some(_) = res { if let Some(_) = res {
return res; return res;
} }
} }