Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 7f0382fa93..870967e84a 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -294,15 +294,13 @@ impl Crate { } fn core(db: &dyn HirDatabase) -> Option<Crate> { - let result = db - .all_crates() + db.all_crates() .iter() .copied() .find(|&krate| { matches!(krate.data(db).origin, CrateOrigin::Lang(LangCrateOrigin::Core)) }) - .map(Crate::from); - result + .map(Crate::from) } } |