aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/lexer/ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/lexer/ptr.rs')
-rw-r--r--crates/ra_syntax/src/lexer/ptr.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/lexer/ptr.rs b/crates/ra_syntax/src/lexer/ptr.rs
index 0a473c991..c341c4176 100644
--- a/crates/ra_syntax/src/lexer/ptr.rs
+++ b/crates/ra_syntax/src/lexer/ptr.rs
@@ -11,10 +11,7 @@ pub(crate) struct Ptr<'s> {
11impl<'s> Ptr<'s> { 11impl<'s> Ptr<'s> {
12 /// Creates a new `Ptr` from a string. 12 /// Creates a new `Ptr` from a string.
13 pub fn new(text: &'s str) -> Ptr<'s> { 13 pub fn new(text: &'s str) -> Ptr<'s> {
14 Ptr { 14 Ptr { text, len: 0.into() }
15 text,
16 len: 0.into(),
17 }
18 } 15 }
19 16
20 /// Gets the length of the remaining string. 17 /// Gets the length of the remaining string.