extract AtomEdit and Edit into new ra_text_edit crate

This commit is contained in:
Bernardo 2018-12-10 22:09:12 +01:00
parent f655f993fe
commit 7344d28768
19 changed files with 81 additions and 40 deletions

View file

@ -1,8 +1,4 @@
use crate::{TextRange, TextUnit};
pub fn contains_offset_nonstrict(range: TextRange, offset: TextUnit) -> bool {
range.start() <= offset && offset <= range.end()
}
use crate::TextRange;
pub fn intersect(r1: TextRange, r2: TextRange) -> Option<TextRange> {
let start = r1.start().max(r2.start());