Skip to content

Commit 6e87065

Browse files
author
Pascal Hertleif
committed
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` 🤷
1 parent d0ff53d commit 6e87065

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/ra_syntax/src/syntax_text.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ impl<'a> SyntaxText<'a> {
6161
self.range.len()
6262
}
6363

64+
pub fn is_empty(&self) -> bool {
65+
self.range.is_empty()
66+
}
67+
6468
/// NB, the offsets here are absolute, and this probably doesn't make sense!
6569
pub fn slice(&self, range: impl ops::RangeBounds<TextUnit>) -> SyntaxText<'a> {
6670
let start = match range.start_bound() {

0 commit comments

Comments
 (0)