about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeroen Vannevel <jer_vannevel@outlook.com>2022-01-10 18:33:28 +0000
committerJeroen Vannevel <jer_vannevel@outlook.com>2022-01-14 01:32:10 +0000
commit5dfc8da77ec9641670cc82232d7bb979a7e9d33b (patch)
tree8e8249e1569ecc8e72d57e9a93e110e584e69b83
parentc52605024c2e6dfb3cc41728bd246b6073ec4998 (diff)
downloadrust-5dfc8da77ec9641670cc82232d7bb979a7e9d33b.tar.gz
rust-5dfc8da77ec9641670cc82232d7bb979a7e9d33b.zip
don't need the as_ref()
-rw-r--r--crates/ide_assists/src/handlers/merge_match_arms.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_assists/src/handlers/merge_match_arms.rs b/crates/ide_assists/src/handlers/merge_match_arms.rs
index 75710b138f5..de796bcc380 100644
--- a/crates/ide_assists/src/handlers/merge_match_arms.rs
+++ b/crates/ide_assists/src/handlers/merge_match_arms.rs
@@ -101,8 +101,8 @@ fn are_same_types(
 ) -> bool {
     let arm_types = get_arm_types(&ctx, &arm);
     for i in 0..arm_types.len() {
-        let other_arm_type = &arm_types[i].as_ref();
-        let current_arm_type = current_arm_types[i].as_ref();
+        let other_arm_type = &arm_types[i];
+        let current_arm_type = &current_arm_types[i];
         if let (Some(other_arm_type), Some(current_arm_type)) = (other_arm_type, current_arm_type) {
             return &other_arm_type.original == &current_arm_type.original;
         }