aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/folding_ranges.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-24 22:40:41 +0100
committerAleksey Kladov <[email protected]>2020-04-25 10:59:18 +0100
commitb1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 (patch)
treee5d136c5ba4a6ba96aeeb423e6e3f64ca7cea3f9 /crates/ra_ide/src/folding_ranges.rs
parent27a7718880d93f55f905da606d108d3b3c682ab4 (diff)
Convert code to text-size
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 ))