LoadingError and InstanceError now only format their inner value

Addressing PR feedback
This commit is contained in:
Aaron Loucks 2019-03-16 13:30:49 -04:00
parent ac4e38a3d9
commit c400af7f32

View file

@ -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),
}
}
}