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
})();
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) {

View File

@ -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

View File

@ -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;
}
}