diff options
author | Aleksey Kladov <[email protected]> | 2021-03-09 15:06:08 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-03-09 15:06:08 +0000 |
commit | 12fe301a0cbe4ffecdabae1c9b827e740e3ce027 (patch) | |
tree | e1442b7be6fb8728b473a3e73d63c6445a211586 /crates/hir | |
parent | abc0ed36bdf4975dc9c5fb2ddd3f960ad2db5494 (diff) |
Cleanup auto-ref in completion
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index d5a3d9034..641ea4221 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1614,10 +1614,9 @@ impl Type { | |||
1614 | } | 1614 | } |
1615 | 1615 | ||
1616 | pub fn remove_ref(&self) -> Option<Type> { | 1616 | pub fn remove_ref(&self) -> Option<Type> { |
1617 | if let Ty::Ref(.., substs) = &self.ty.value { | 1617 | match &self.ty.value { |
1618 | Some(self.derived(substs[0].clone())) | 1618 | Ty::Ref(.., substs) => Some(self.derived(substs[0].clone())), |
1619 | } else { | 1619 | _ => None, |
1620 | None | ||
1621 | } | 1620 | } |
1622 | } | 1621 | } |
1623 | 1622 | ||