aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/string_lexing/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/string_lexing/parser.rs')
-rw-r--r--crates/ra_syntax/src/string_lexing/parser.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_syntax/src/string_lexing/parser.rs b/crates/ra_syntax/src/string_lexing/parser.rs
index e835382fc..7469eb903 100644
--- a/crates/ra_syntax/src/string_lexing/parser.rs
+++ b/crates/ra_syntax/src/string_lexing/parser.rs
@@ -24,9 +24,7 @@ impl<'a> Parser<'a> {
24 } 24 }
25 25
26 pub fn advance(&mut self) -> char { 26 pub fn advance(&mut self) -> char {
27 let next = self 27 let next = self.peek().expect("cannot advance if end of input is reached");
28 .peek()
29 .expect("cannot advance if end of input is reached");
30 self.pos += next.len_utf8(); 28 self.pos += next.len_utf8();
31 next 29 next
32 } 30 }
@@ -133,10 +131,7 @@ impl<'a> Parser<'a> {
133 Some(self.parse_escape(start)) 131 Some(self.parse_escape(start))
134 } else { 132 } else {
135 let end = self.get_pos(); 133 let end = self.get_pos();
136 Some(StringComponent::new( 134 Some(StringComponent::new(TextRange::from_to(start, end), CodePoint))
137 TextRange::from_to(start, end),
138 CodePoint,
139 ))
140 } 135 }
141 } 136 }
142 137