diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-02 20:22:08 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-02 20:22:08 +0200 |
| commit | dc8d5d2f1eadb19d0351fa214400d7ec7ba31a20 (patch) | |
| tree | 64c0ebb599c480270ac529edbc14b02534853828 /src/parse/scanner.rs | |
| parent | 904bc392abdcd7c48fa4541594f6218168afb61f (diff) | |
Small improvements 🧺
Diffstat (limited to 'src/parse/scanner.rs')
| -rw-r--r-- | src/parse/scanner.rs | 4 |
1 files changed, 0 insertions, 4 deletions
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; } |
