Remove code duplication in tests

This commit is contained in:
Aleksey Kladov 2020-02-25 18:57:47 +01:00
parent ae0aeb1b23
commit 52fd19621c
3 changed files with 75 additions and 102 deletions

View file

@ -83,6 +83,7 @@ fn try_extract_range(text: &str) -> Option<(TextRange, String)> {
Some((TextRange::from_to(start, end), text))
}
#[derive(Clone, Copy)]
pub enum RangeOrOffset {
Range(TextRange),
Offset(TextUnit),