summaryrefslogtreecommitdiff
path: root/src/parse/tokens.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-21 16:38:51 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-21 17:30:21 +0200
commit0dd4ae0a7ac0c247078df492469ff20b8a90c886 (patch)
tree07a55343b9ccab3fe76b0f1b0de9d1be310d8b14 /src/parse/tokens.rs
parentf38eb10c2b54bd13ccef119454839f6a66448462 (diff)
Prune derives
Diffstat (limited to 'src/parse/tokens.rs')
-rw-r--r--src/parse/tokens.rs11
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;