mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
extract AtomEdit and Edit into new ra_text_edit crate
This commit is contained in:
parent
f655f993fe
commit
7344d28768
19 changed files with 81 additions and 40 deletions
5
crates/ra_text_edit/src/text_utils.rs
Normal file
5
crates/ra_text_edit/src/text_utils.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
use text_unit::{TextRange, TextUnit};
|
||||
|
||||
pub fn contains_offset_nonstrict(range: TextRange, offset: TextUnit) -> bool {
|
||||
range.start() <= offset && offset <= range.end()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue