aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 18:04:08 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 18:04:08 +0000
commitc9e42fcf245be16958dca6571e4bccc6c29199df (patch)
treecaa02f8086ad15fb6f884e56bc6a0231b203215f /crates/ra_db/src/lib.rs
parent1c25bf05d714680c048d250a5d39e8a4c25f0c31 (diff)
parent695294bbb974cdbac136e260029403e90a17d953 (diff)
Merge #468
468: decouple ra_editor from other stuff r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_db/src/lib.rs')
-rw-r--r--crates/ra_db/src/lib.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index 732899718..f56f70983 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -5,9 +5,6 @@ mod input;
5mod loc2id; 5mod loc2id;
6pub mod mock; 6pub mod mock;
7 7
8use std::sync::Arc;
9
10use ra_editor::LineIndex;
11use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr}; 8use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr};
12 9
13pub use crate::{ 10pub use crate::{
@@ -36,9 +33,6 @@ salsa::query_group! {
36 fn source_file(file_id: FileId) -> TreePtr<SourceFile> { 33 fn source_file(file_id: FileId) -> TreePtr<SourceFile> {
37 type SourceFileQuery; 34 type SourceFileQuery;
38 } 35 }
39 fn file_lines(file_id: FileId) -> Arc<LineIndex> {
40 type FileLinesQuery;
41 }
42 } 36 }
43} 37}
44 38
@@ -46,10 +40,6 @@ fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreePtr<SourceFile>
46 let text = db.file_text(file_id); 40 let text = db.file_text(file_id);
47 SourceFile::parse(&*text) 41 SourceFile::parse(&*text)
48} 42}
49fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc<LineIndex> {
50 let text = db.file_text(file_id);
51 Arc::new(LineIndex::new(&*text))
52}
53 43
54#[derive(Clone, Copy, Debug)] 44#[derive(Clone, Copy, Debug)]
55pub struct FilePosition { 45pub struct FilePosition {