diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-08-21 16:38:51 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-08-21 17:30:21 +0200 |
| commit | 0dd4ae0a7ac0c247078df492469ff20b8a90c886 (patch) | |
| tree | 07a55343b9ccab3fe76b0f1b0de9d1be310d8b14 /src/parse/tokens.rs | |
| parent | f38eb10c2b54bd13ccef119454839f6a66448462 (diff) | |
Prune derives
Diffstat (limited to 'src/parse/tokens.rs')
| -rw-r--r-- | src/parse/tokens.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs index 684e340e..91d3ab7f 100644 --- a/src/parse/tokens.rs +++ b/src/parse/tokens.rs @@ -1,11 +1,8 @@ -use std::fmt::{self, Debug, Formatter}; - use super::{is_newline, Scanner}; use crate::geom::{AngularUnit, LengthUnit}; use crate::syntax::*; /// An iterator over the tokens of a string of source code. -#[derive(Clone)] pub struct Tokens<'s> { s: Scanner<'s>, mode: TokenMode, @@ -481,12 +478,6 @@ impl<'s> Tokens<'s> { } } -impl Debug for Tokens<'_> { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - write!(f, "Tokens({}|{})", self.s.eaten(), self.s.rest()) - } -} - fn keyword(ident: &str) -> Option<Token<'static>> { Some(match ident { "not" => Token::Not, @@ -512,6 +503,8 @@ fn keyword(ident: &str) -> Option<Token<'static>> { #[cfg(test)] #[allow(non_snake_case)] mod tests { + use std::fmt::Debug; + use super::*; use Option::None; |
