std::fmt::Display for HostError

This commit is contained in:
ChristianVisintin
2020-11-27 16:17:56 +01:00
parent 6aa63ff07a
commit a135d0b7a7

View File

@@ -83,7 +83,7 @@ impl std::fmt::Display for HostError {
HostErrorType::CouldNotCreateFile => "Could not create file",
HostErrorType::DeleteFailed => "Could not delete file",
};
match self.ioerr {
match &self.ioerr {
Some(err) => write!(f, "{}: {}", code_str, err),
None => write!(f, "{}", code_str)
}