diff options
author | Aleksey Kladov <[email protected]> | 2018-12-28 15:03:03 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-28 15:17:43 +0000 |
commit | 02924174bb084d73cab67af6665ddf00e91983f6 (patch) | |
tree | 35e47a7e720a448a407fbca607f5895aacb68428 /crates/ra_db/src | |
parent | d7440a5f4928415f2d2a9f7b2badaff8a9376a09 (diff) |
introduce FileRange
Diffstat (limited to 'crates/ra_db/src')
-rw-r--r-- | crates/ra_db/src/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
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; | |||
8 | use std::sync::Arc; | 8 | use std::sync::Arc; |
9 | 9 | ||
10 | use ra_editor::LineIndex; | 10 | use ra_editor::LineIndex; |
11 | use ra_syntax::{TextUnit, SourceFileNode}; | 11 | use ra_syntax::{TextUnit, TextRange, SourceFileNode}; |
12 | 12 | ||
13 | pub use crate::{ | 13 | pub use crate::{ |
14 | cancelation::{Canceled, Cancelable}, | 14 | cancelation::{Canceled, Cancelable}, |
@@ -70,3 +70,9 @@ pub struct FilePosition { | |||
70 | pub file_id: FileId, | 70 | pub file_id: FileId, |
71 | pub offset: TextUnit, | 71 | pub offset: TextUnit, |
72 | } | 72 | } |
73 | |||
74 | #[derive(Clone, Copy, Debug)] | ||
75 | pub struct FileRange { | ||
76 | pub file_id: FileId, | ||
77 | pub range: TextRange, | ||
78 | } | ||