simplify Display on QuoteKind
This commit is contained in:
parent
1b774a9b91
commit
edb9dde259
@ -1,4 +1,4 @@
|
||||
use std::fmt::{self, Display};
|
||||
use std::fmt::{self, Write, Display};
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
pub enum Op {
|
||||
@ -71,8 +71,8 @@ impl Display for QuoteKind {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Self::Quoted => write!(f, "\""),
|
||||
Self::None => write!(f, ""),
|
||||
Self::Quoted => f.write_char('"'),
|
||||
Self::None => Ok(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user