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.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/lexer/ptr.rs b/crates/ra_syntax/src/lexer/ptr.rs
index fa79d8862..4c291b9c4 100644
--- a/crates/ra_syntax/src/lexer/ptr.rs
+++ b/crates/ra_syntax/src/lexer/ptr.rs
@@ -31,7 +31,7 @@ impl<'s> Ptr<'s> {
31 /// For example, 0 will return the current token, 1 will return the next, etc. 31 /// For example, 0 will return the current token, 1 will return the next, etc.
32 pub fn nth(&self, n: u32) -> Option<char> { 32 pub fn nth(&self, n: u32) -> Option<char> {
33 let mut chars = self.chars().peekable(); 33 let mut chars = self.chars().peekable();
34 chars.by_ref().skip(n as usize).next() 34 chars.by_ref().nth(n as usize)
35 } 35 }
36 36
37 /// Checks whether the current character is `c`. 37 /// Checks whether the current character is `c`.