diff options
Diffstat (limited to 'crates/ra_db')
-rw-r--r-- | crates/ra_db/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_db/src/lib.rs | 10 |
2 files changed, 0 insertions, 11 deletions
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml index c43e65051..2c1f94ad0 100644 --- a/crates/ra_db/Cargo.toml +++ b/crates/ra_db/Cargo.toml | |||
@@ -11,5 +11,4 @@ rustc-hash = "1.0" | |||
11 | parking_lot = "0.7.0" | 11 | parking_lot = "0.7.0" |
12 | ra_arena = { path = "../ra_arena" } | 12 | ra_arena = { path = "../ra_arena" } |
13 | ra_syntax = { path = "../ra_syntax" } | 13 | ra_syntax = { path = "../ra_syntax" } |
14 | ra_editor = { path = "../ra_editor" } | ||
15 | test_utils = { path = "../test_utils" } | 14 | test_utils = { path = "../test_utils" } |
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; | |||
5 | mod loc2id; | 5 | mod loc2id; |
6 | pub mod mock; | 6 | pub mod mock; |
7 | 7 | ||
8 | use std::sync::Arc; | ||
9 | |||
10 | use ra_editor::LineIndex; | ||
11 | use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr}; | 8 | use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr}; |
12 | 9 | ||
13 | pub use crate::{ | 10 | pub 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 | } |
49 | fn 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)] |
55 | pub struct FilePosition { | 45 | pub struct FilePosition { |