error: fmt WriteError style

This commit is contained in:
Astro 2020-12-11 18:11:55 +01:00
parent a0f34e945d
commit e5f8b6b56e
1 changed files with 3 additions and 3 deletions

View File

@ -54,11 +54,11 @@ pub enum WriteError<B> {
impl<B: fmt::Display> fmt::Display for WriteError<B> { impl<B: fmt::Display> fmt::Display for WriteError<B> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self { match &self {
&WriteError::SpaceExhausted => &WriteError::SpaceExhausted =>
write!(f, "space exhausted"), write!(f, "space exhausted"),
&WriteError::Backend(ref e) => &WriteError::Backend(err) =>
e.fmt(f), write!(f, "{}", err)
} }
} }
} }