From a135d0b7a76c48159093278118f2e4375573599f Mon Sep 17 00:00:00 2001 From: ChristianVisintin Date: Fri, 27 Nov 2020 16:17:56 +0100 Subject: [PATCH] std::fmt::Display for HostError --- src/host/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host/mod.rs b/src/host/mod.rs index e05ac9a..e48d3ca 100644 --- a/src/host/mod.rs +++ b/src/host/mod.rs @@ -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) }