aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Hertleif <[email protected]>2019-07-10 16:05:39 +0100
committerPascal Hertleif <[email protected]>2019-07-10 16:05:39 +0100
commit6e870659684c9c2827eb9b9d62860a993f738953 (patch)
tree46788abb5483958dc0cac36e32c21a0c55086833
parentd0ff53de2d93ef5fa4f70fb47bd1175788b7358f (diff)
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` :shrug:
-rw-r--r--crates/ra_syntax/src/syntax_text.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/syntax_text.rs b/crates/ra_syntax/src/syntax_text.rs
index 844bd3e13..939f2c02f 100644
--- a/crates/ra_syntax/src/syntax_text.rs
+++ b/crates/ra_syntax/src/syntax_text.rs
@@ -61,6 +61,10 @@ impl<'a> SyntaxText<'a> {
61 self.range.len() 61 self.range.len()
62 } 62 }
63 63
64 pub fn is_empty(&self) -> bool {
65 self.range.is_empty()
66 }
67
64 /// NB, the offsets here are absolute, and this probably doesn't make sense! 68 /// NB, the offsets here are absolute, and this probably doesn't make sense!
65 pub fn slice(&self, range: impl ops::RangeBounds<TextUnit>) -> SyntaxText<'a> { 69 pub fn slice(&self, range: impl ops::RangeBounds<TextUnit>) -> SyntaxText<'a> {
66 let start = match range.start_bound() { 70 let start = match range.start_bound() {