From 695294bbb974cdbac136e260029403e90a17d953 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 8 Jan 2019 21:00:51 +0300 Subject: ra_db is independent from editor --- crates/ra_db/src/lib.rs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'crates/ra_db/src') 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; mod loc2id; pub mod mock; -use std::sync::Arc; - -use ra_editor::LineIndex; use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr}; pub use crate::{ @@ -36,9 +33,6 @@ salsa::query_group! { fn source_file(file_id: FileId) -> TreePtr { type SourceFileQuery; } - fn file_lines(file_id: FileId) -> Arc { - type FileLinesQuery; - } } } @@ -46,10 +40,6 @@ fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreePtr let text = db.file_text(file_id); SourceFile::parse(&*text) } -fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc { - let text = db.file_text(file_id); - Arc::new(LineIndex::new(&*text)) -} #[derive(Clone, Copy, Debug)] pub struct FilePosition { -- cgit v1.2.3