We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0ff53d commit 6e87065Copy full SHA for 6e87065
crates/ra_syntax/src/syntax_text.rs
@@ -61,6 +61,10 @@ impl<'a> SyntaxText<'a> {
61
self.range.len()
62
}
63
64
+ pub fn is_empty(&self) -> bool {
65
+ self.range.is_empty()
66
+ }
67
+
68
/// NB, the offsets here are absolute, and this probably doesn't make sense!
69
pub fn slice(&self, range: impl ops::RangeBounds<TextUnit>) -> SyntaxText<'a> {
70
let start = match range.start_bound() {
0 commit comments