mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
improving code to work with multi-workspaces
This commit is contained in:
parent
1b8288ff96
commit
8e687f7afb
6 changed files with 89 additions and 23 deletions
|
@ -1,9 +1,9 @@
|
|||
use ide_db::{
|
||||
base_db::{CrateOrigin, SourceDatabase, SourceDatabaseExt},
|
||||
RootDatabase,
|
||||
FxIndexSet, RootDatabase,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct CrateInfo {
|
||||
pub name: String,
|
||||
pub version: String,
|
||||
|
@ -16,7 +16,7 @@ pub struct CrateInfo {
|
|||
//
|
||||
// |===
|
||||
// image::https://user-images.githubusercontent.com/5748995/229394139-2625beab-f4c9-484b-84ed-ad5dee0b1e1a.png[]
|
||||
pub(crate) fn fetch_crates(db: &RootDatabase) -> Vec<CrateInfo> {
|
||||
pub(crate) fn fetch_crates(db: &RootDatabase) -> FxIndexSet<CrateInfo> {
|
||||
let crate_graph = db.crate_graph();
|
||||
crate_graph
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue