mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Merge #2000
2000: Use correct db type r=matklad a=kjeremy I think this is more correct. No test fallouts. Co-authored-by: kjeremy <kjeremy@gmail.com>
This commit is contained in:
commit
85361e8d50
@ -104,7 +104,7 @@ pub(crate) trait LineIndexDatabase: ra_db::SourceDatabase + CheckCanceled {
|
|||||||
fn line_index(&self, file_id: FileId) -> Arc<LineIndex>;
|
fn line_index(&self, file_id: FileId) -> Arc<LineIndex>;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn line_index(db: &impl ra_db::SourceDatabase, file_id: FileId) -> Arc<LineIndex> {
|
fn line_index(db: &impl LineIndexDatabase, file_id: FileId) -> Arc<LineIndex> {
|
||||||
let text = db.file_text(file_id);
|
let text = db.file_text(file_id);
|
||||||
Arc::new(LineIndex::new(&*text))
|
Arc::new(LineIndex::new(&*text))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user