aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_text_edit/src/text_utils.rs
blob: e3b4dc4fe35552b9bfce0d3eac6844a4c39af98e (plain)
1
2
3
4
5
use text_unit::{TextRange, TextUnit};

pub fn contains_offset_nonstrict(range: TextRange, offset: TextUnit) -> bool {
    range.start() <= offset && offset <= range.end()
}