From c400af7f327e71c32765f05603ff2e5f7748303c Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Sat, 16 Mar 2019 13:30:49 -0400 Subject: [PATCH] LoadingError and InstanceError now only format their inner value Addressing PR feedback --- ash/src/entry.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ash/src/entry.rs b/ash/src/entry.rs index b17fa0a..d31dd8c 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -46,7 +46,9 @@ pub enum LoadingError { impl fmt::Display for LoadingError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "LoadingError::{:?}", self) + match self { + LoadingError::LibraryLoadError(e) => write!(f, "{}", e), + } } } @@ -60,7 +62,10 @@ pub enum InstanceError { impl fmt::Display for InstanceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "InstanceError::{:?}", self) + match self { + InstanceError::LoadError(e) => write!(f, "{}", e.join("; ")), + InstanceError::VkError(e) => write!(f, "{}", e), + } } }