From dc8d5d2f1eadb19d0351fa214400d7ec7ba31a20 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 2 Oct 2020 20:22:08 +0200 Subject: =?UTF-8?q?Small=20improvements=20=F0=9F=A7=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parse/scanner.rs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/parse/scanner.rs') diff --git a/src/parse/scanner.rs b/src/parse/scanner.rs index b7107979..02562839 100644 --- a/src/parse/scanner.rs +++ b/src/parse/scanner.rs @@ -32,8 +32,6 @@ impl<'s> Scanner<'s> { /// Returns whether the char was consumed. pub fn eat_if(&mut self, c: char) -> bool { // Don't decode the char twice through peek() and eat(). - // - // TODO: Benchmark this vs. the naive version. if self.iter.next() == Some(c) { self.index += c.len_utf8(); true @@ -71,8 +69,6 @@ impl<'s> Scanner<'s> { if f(c) { // Undo the previous `next()` without peeking all the time // during iteration. - // - // TODO: Benchmark this vs. the naive peeking version. self.reset(); break; } -- cgit v1.2.3