mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
redundant_pattern_matching
This commit is contained in:
parent
5a62a0db46
commit
71d4dba960
17 changed files with 39 additions and 46 deletions
|
@ -614,7 +614,7 @@ impl SourceAnalyzer {
|
|||
}
|
||||
None
|
||||
})();
|
||||
if let Some(_) = resolved {
|
||||
if resolved.is_some() {
|
||||
return resolved;
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ impl SourceAnalyzer {
|
|||
if let Some(name_ref) = path.as_single_name_ref() {
|
||||
let builtin =
|
||||
BuiltinAttr::by_name(db, self.resolver.krate().into(), &name_ref.text());
|
||||
if let Some(_) = builtin {
|
||||
if builtin.is_some() {
|
||||
return builtin.map(PathResolution::BuiltinAttr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue