From a5da770ec60a73abcc5350f25146be973540063f Mon Sep 17 00:00:00 2001 From: Alan Du Date: Wed, 17 Oct 2018 19:25:37 -0400 Subject: Fix function calls --- crates/ra_syntax/src/lexer/ptr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/lexer') 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> { /// For example, 0 will return the current token, 1 will return the next, etc. pub fn nth(&self, n: u32) -> Option { let mut chars = self.chars().peekable(); - chars.by_ref().skip(n as usize).next() + chars.by_ref().nth(n as usize) } /// Checks whether the current character is `c`. -- cgit v1.2.3