From 94796e6447c8af9d7444164c2175ca5dae4a563e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Ochagav=C3=ADa?= Date: Wed, 7 Nov 2018 11:35:33 +0100 Subject: Add lots of tests --- crates/ra_syntax/src/lexer/ptr.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (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 4c291b9c4..7e4df51aa 100644 --- a/crates/ra_syntax/src/lexer/ptr.rs +++ b/crates/ra_syntax/src/lexer/ptr.rs @@ -30,8 +30,7 @@ impl<'s> Ptr<'s> { /// Gets the nth character from the current. /// 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().nth(n as usize) + self.chars().nth(n as usize) } /// Checks whether the current character is `c`. -- cgit v1.2.3