diff --git a/src/lib.rs b/src/lib.rs index 7088f77..631d5bb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,11 +39,22 @@ enum Error { impl StdError for Error {} #[cfg(target_os = "macos")] +#[derive(Debug)] enum MacOsError { AppErr(ApplicationError), NotErr(NotificationError), } +#[cfg(target_os = "macos")] +impl Display for MacOsError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + MacOsError::AppErr(e) => Display::fmt(e, f), + MacOsError::NotErr(e) => Display::fmt(e, f), + } + } +} + impl Display for Error { fn fmt(&self, fmt: &mut Formatter) -> Result<(), fmt::Error> { match self {