From d8a5d39c2d05fb59b6c243935111714e18334599 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 11 Jun 2020 11:30:06 +0200 Subject: Make relevant_crates return a Set --- crates/ra_hir_expand/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ra_hir_expand/src/lib.rs') diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index f440c073b..dc4d7f000 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs @@ -424,3 +424,8 @@ impl InFile { self.with_value(self.value.syntax()) } } + +// FIXME: this is obviously wrong, there shouldn't be any guesing here +fn guess_crate(db: &dyn db::AstDatabase, file_id: FileId) -> Option { + db.relevant_crates(file_id).iter().next().copied() +} -- cgit v1.2.3