aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/folding_ranges.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/folding_ranges.rs')
-rw-r--r--crates/ra_ide/src/folding_ranges.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs
index 4eeb76d14..034c4c7d4 100644
--- a/crates/ra_ide/src/folding_ranges.rs
+++ b/crates/ra_ide/src/folding_ranges.rs
@@ -141,7 +141,7 @@ fn contiguous_range_for_group_unless(
141 } 141 }
142 142
143 if first != &last { 143 if first != &last {
144 Some(TextRange::from_to(first.text_range().start(), last.text_range().end())) 144 Some(TextRange::new(first.text_range().start(), last.text_range().end()))
145 } else { 145 } else {
146 // The group consists of only one element, therefore it cannot be folded 146 // The group consists of only one element, therefore it cannot be folded
147 None 147 None
@@ -187,7 +187,7 @@ fn contiguous_range_for_comment(
187 } 187 }
188 188
189 if first != last { 189 if first != last {
190 Some(TextRange::from_to( 190 Some(TextRange::new(
191 first.syntax().text_range().start(), 191 first.syntax().text_range().start(),
192 last.syntax().text_range().end(), 192 last.syntax().text_range().end(),
193 )) 193 ))