mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
upstream text-utils to text_unit
This commit is contained in:
parent
c9e42fcf24
commit
f553837c1c
10 changed files with 20 additions and 44 deletions
|
@ -1,5 +1,4 @@
|
|||
use crate::AtomTextEdit;
|
||||
use crate::text_utils::contains_offset_nonstrict;
|
||||
use text_unit::{TextRange, TextUnit};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -28,7 +27,7 @@ impl TextEditBuilder {
|
|||
pub fn invalidates_offset(&self, offset: TextUnit) -> bool {
|
||||
self.atoms
|
||||
.iter()
|
||||
.any(|atom| contains_offset_nonstrict(atom.delete, offset))
|
||||
.any(|atom| atom.delete.contains_inclusive(offset))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue