Delete unused Display for pretty printer Token

This commit is contained in:
David Tolnay 2022-01-19 18:26:16 -08:00
parent 237949b6c8
commit eec6016ec3
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -137,7 +137,6 @@ mod ring;
use ring::RingBuffer;
use std::borrow::Cow;
use std::collections::VecDeque;
use std::fmt;
/// How to break. Described in more detail in the module docs.
#[derive(Clone, Copy, PartialEq)]
@ -175,17 +174,6 @@ impl Token {
}
}
impl fmt::Display for Token {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
Token::String(ref s) => write!(f, "STR({},{})", s, s.len()),
Token::Break(_) => f.write_str("BREAK"),
Token::Begin(_) => f.write_str("BEGIN"),
Token::End => f.write_str("END"),
}
}
}
#[derive(Copy, Clone)]
enum PrintStackBreak {
Fits,