just print message for impl Display

master
rascul 8 months ago
parent bfa8a5b49e
commit 13fa4c11b8

@ -37,11 +37,7 @@ impl Rear {
impl Display for Rear { impl Display for Rear {
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
if !self.message.is_empty() { write!(f, "{}", &self.message)
write!(f, "{}", self.error)
} else {
write!(f, "{}\n{}", &self.message, &self.error)
}
} }
} }

Loading…
Cancel
Save