mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Expose len
This commit is contained in:
parent
9d4d45215a
commit
60056b8845
1 changed files with 5 additions and 0 deletions
|
@ -229,4 +229,9 @@ impl LineIndex {
|
|||
.map(|(lo, hi)| TextRange::new(lo, hi))
|
||||
.filter(|it| !it.is_empty())
|
||||
}
|
||||
|
||||
/// Returns the length of the original text.
|
||||
pub fn len(&self) -> TextSize {
|
||||
self.len
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue