From 02924174bb084d73cab67af6665ddf00e91983f6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 28 Dec 2018 18:03:03 +0300 Subject: introduce FileRange --- crates/ra_db/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/ra_db/src/lib.rs') diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 3028db17c..7181f2950 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs @@ -8,7 +8,7 @@ pub mod mock; use std::sync::Arc; use ra_editor::LineIndex; -use ra_syntax::{TextUnit, SourceFileNode}; +use ra_syntax::{TextUnit, TextRange, SourceFileNode}; pub use crate::{ cancelation::{Canceled, Cancelable}, @@ -70,3 +70,9 @@ pub struct FilePosition { pub file_id: FileId, pub offset: TextUnit, } + +#[derive(Clone, Copy, Debug)] +pub struct FileRange { + pub file_id: FileId, + pub range: TextRange, +} -- cgit v1.2.3