be more careful with adding semis

This commit is contained in:
Aleksey Kladov
2018-08-28 21:45:59 +03:00
parent f5de8212da
commit e6ab53619b
2 changed files with 9 additions and 0 deletions

View File

@@ -99,3 +99,9 @@ impl SyntaxTextSlice for ops::RangeFrom<TextUnit> {
Some(TextRange::from_to(self.start, range.end()))
}
}
impl SyntaxTextSlice for ops::Range<TextUnit> {
fn restrict(&self, range: TextRange) -> Option<TextRange> {
TextRange::from_to(self.start, self.end).restrict(range)
}
}