aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorLukas Tobias Wirth <[email protected]>2021-05-05 21:55:12 +0100
committerLukas Tobias Wirth <[email protected]>2021-05-05 21:55:12 +0100
commit3f796fea9fab0222913f9f895af78b80c4c7660b (patch)
treeb8ced23c567c160f9207d52c30e0f08e1aead992 /crates/ide/src
parentd26fb188c14e38f5795d1be359defd257c464f37 (diff)
simplify
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/inlay_hints.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index d5ef054d8..e0bf660c4 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -218,9 +218,7 @@ fn hint_iterator(
218 ty: &hir::Type, 218 ty: &hir::Type,
219) -> Option<SmolStr> { 219) -> Option<SmolStr> {
220 let db = sema.db; 220 let db = sema.db;
221 let strukt = std::iter::successors(Some(ty.clone()), |ty| ty.remove_ref()) 221 let strukt = ty.strip_references().as_adt()?;
222 .last()
223 .and_then(|strukt| strukt.as_adt())?;
224 let krate = strukt.krate(db); 222 let krate = strukt.krate(db);
225 if krate != famous_defs.core()? { 223 if krate != famous_defs.core()? {
226 return None; 224 return None;