Make clippy a bit happier

Random drive-by fix. I honestly blame rust-analyzer itself on this,
because I set its watch mode to use `cargo clippy` 🤷
This commit is contained in:
Pascal Hertleif 2019-07-10 17:05:39 +02:00
parent d0ff53de2d
commit 6e87065968

View File

@ -61,6 +61,10 @@ impl<'a> SyntaxText<'a> {
self.range.len()
}
pub fn is_empty(&self) -> bool {
self.range.is_empty()
}
/// NB, the offsets here are absolute, and this probably doesn't make sense!
pub fn slice(&self, range: impl ops::RangeBounds<TextUnit>) -> SyntaxText<'a> {
let start = match range.start_bound() {