mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
introduce FileRange
This commit is contained in:
parent
d7440a5f49
commit
02924174bb
3 changed files with 29 additions and 19 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue