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)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||||
pub enum Op {
|
pub enum Op {
|
||||||
@ -71,8 +71,8 @@ impl Display for QuoteKind {
|
|||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::Quoted => write!(f, "\""),
|
Self::Quoted => f.write_char('"'),
|
||||||
Self::None => write!(f, ""),
|
Self::None => Ok(()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user