Write converted config

This commit is contained in:
Dominik Werder
2021-12-09 14:55:56 +01:00
parent 2449a20775
commit 11229bd514
12 changed files with 609 additions and 124 deletions

View File

@@ -131,9 +131,13 @@ impl fmt::Debug for Error {
} else if let Some(s) = &self.trace_str {
s.into()
} else {
"NOTRACE".into()
String::new()
};
write!(fmt, "Error {}\nTrace:\n{}", self.msg, trace_str)
write!(fmt, "{}", self.msg)?;
if !trace_str.is_empty() {
write!(fmt, "\nTrace:\n{}", trace_str)?;
}
Ok(())
}
}