diff options
Diffstat (limited to 'crates/ra_db/src')
-rw-r--r-- | crates/ra_db/src/lib.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 1ddacc1f6..590efffa4 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -113,7 +113,7 @@ pub trait SourceDatabase: CheckCanceled + FileLoader + std::fmt::Debug { | |||
113 | fn crate_graph(&self) -> Arc<CrateGraph>; | 113 | fn crate_graph(&self) -> Arc<CrateGraph>; |
114 | } | 114 | } |
115 | 115 | ||
116 | fn parse_query(db: &impl SourceDatabase, file_id: FileId) -> Parse<ast::SourceFile> { | 116 | fn parse_query(db: &dyn SourceDatabase, file_id: FileId) -> Parse<ast::SourceFile> { |
117 | let _p = profile("parse_query").detail(|| format!("{:?}", file_id)); | 117 | let _p = profile("parse_query").detail(|| format!("{:?}", file_id)); |
118 | let text = db.file_text(file_id); | 118 | let text = db.file_text(file_id); |
119 | SourceFile::parse(&*text) | 119 | SourceFile::parse(&*text) |
@@ -136,10 +136,7 @@ pub trait SourceDatabaseExt: SourceDatabase { | |||
136 | fn source_root_crates(&self, id: SourceRootId) -> Arc<FxHashSet<CrateId>>; | 136 | fn source_root_crates(&self, id: SourceRootId) -> Arc<FxHashSet<CrateId>>; |
137 | } | 137 | } |
138 | 138 | ||
139 | fn source_root_crates( | 139 | fn source_root_crates(db: &dyn SourceDatabaseExt, id: SourceRootId) -> Arc<FxHashSet<CrateId>> { |
140 | db: &(impl SourceDatabaseExt + SourceDatabase), | ||
141 | id: SourceRootId, | ||
142 | ) -> Arc<FxHashSet<CrateId>> { | ||
143 | let graph = db.crate_graph(); | 140 | let graph = db.crate_graph(); |
144 | let res = graph | 141 | let res = graph |
145 | .iter() | 142 | .iter() |