This commit is contained in:
Jonas Schievink 2020-04-30 00:09:00 +02:00
parent cafa7a780a
commit 15233a467d

View File

@ -76,11 +76,7 @@ pub fn assoc_type_shorthand_candidates<R>(
db: &dyn HirDatabase,
mut cb: impl FnMut(TypeAlias) -> Option<R>,
) -> Option<R> {
if let Some(res) = self.in_type_ns() {
associated_type_shorthand_candidates(db, res, |_, _, id| cb(id.into()))
} else {
None
}
associated_type_shorthand_candidates(db, self.in_type_ns()?, |_, _, id| cb(id.into()))
}
}