From 6e870659684c9c2827eb9b9d62860a993f738953 Mon Sep 17 00:00:00 2001
From: Pascal Hertleif <pascal@technocreatives.com>
Date: Wed, 10 Jul 2019 17:05:39 +0200
Subject: [PATCH] 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:
---
 crates/ra_syntax/src/syntax_text.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/crates/ra_syntax/src/syntax_text.rs b/crates/ra_syntax/src/syntax_text.rs
index 844bd3e13f2..939f2c02f9a 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> {
         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() {