mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
removed unwrap
This commit is contained in:
parent
7bc89f2542
commit
08300284e7
@ -101,19 +101,18 @@ fn are_same_types(
|
|||||||
) -> bool {
|
) -> bool {
|
||||||
let arm_types = get_arm_types(&ctx, &arm);
|
let arm_types = get_arm_types(&ctx, &arm);
|
||||||
for other_arm_type_entry in arm_types {
|
for other_arm_type_entry in arm_types {
|
||||||
let current_arm_type = current_arm_types.get_key_value(&other_arm_type_entry.0);
|
let current_arm_type_kv = current_arm_types.get_key_value(&other_arm_type_entry.0);
|
||||||
if current_arm_type.is_none() {
|
if let Some(current_arm_type) = current_arm_type_kv {
|
||||||
return false;
|
if let (Some(other_arm_type), Some(current_arm_type)) =
|
||||||
}
|
(other_arm_type_entry.1, current_arm_type.1)
|
||||||
|
{
|
||||||
let unwrapped_current_arm_type = current_arm_type.unwrap().1;
|
if other_arm_type.original != current_arm_type.original {
|
||||||
|
return false;
|
||||||
if let (Some(other_arm_type), Some(current_arm_type)) =
|
}
|
||||||
(other_arm_type_entry.1, unwrapped_current_arm_type)
|
|
||||||
{
|
|
||||||
if other_arm_type.original != current_arm_type.original {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// No corresponding field found
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user