Replace write! with direct calls

This commit is contained in:
Laurențiu Nicola 2022-03-21 10:43:36 +02:00
parent b594f9c441
commit 1a37b17162
13 changed files with 59 additions and 49 deletions

View file

@ -95,9 +95,10 @@ pub struct ServerError {
impl fmt::Display for ServerError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.message)?;
self.message.fmt(f)?;
if let Some(io) = &self.io {
write!(f, ": {}", io)?;
f.write_str(": ")?;
io.fmt(f)?;
}
Ok(())
}