diff options
Diffstat (limited to 'crates/ra_text_edit/src')
-rw-r--r-- | crates/ra_text_edit/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_text_edit/src/lib.rs b/crates/ra_text_edit/src/lib.rs index 7138bbc65..3409713ff 100644 --- a/crates/ra_text_edit/src/lib.rs +++ b/crates/ra_text_edit/src/lib.rs | |||
@@ -4,7 +4,7 @@ | |||
4 | //! so `TextEdit` is the ultimate representation of the work done by | 4 | //! so `TextEdit` is the ultimate representation of the work done by |
5 | //! rust-analyzer. | 5 | //! rust-analyzer. |
6 | 6 | ||
7 | use text_size::{TextRange, TextSize}; | 7 | pub use text_size::{TextRange, TextSize}; |
8 | 8 | ||
9 | /// `InsertDelete` -- a single "atomic" change to text | 9 | /// `InsertDelete` -- a single "atomic" change to text |
10 | /// | 10 | /// |
@@ -71,6 +71,10 @@ impl TextEdit { | |||
71 | TextEdit { indels } | 71 | TextEdit { indels } |
72 | } | 72 | } |
73 | 73 | ||
74 | pub fn is_empty(&self) -> bool { | ||
75 | self.indels.is_empty() | ||
76 | } | ||
77 | |||
74 | pub fn as_indels(&self) -> &[Indel] { | 78 | pub fn as_indels(&self) -> &[Indel] { |
75 | &self.indels | 79 | &self.indels |
76 | } | 80 | } |