Skip to content

Commit

Permalink
impl Error trait for ParseMonthError
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-kfed committed Jul 20, 2023
1 parent 5255fc9 commit bd2b225
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/month.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,16 @@ pub struct ParseMonthError {
pub(crate) _dummy: (),
}

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl std::error::Error for ParseMonthError {}

impl fmt::Display for ParseMonthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "ParseMonthError {{ .. }}")
}
}

impl fmt::Debug for ParseMonthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "ParseMonthError {{ .. }}")
Expand Down

0 comments on commit bd2b225

Please sign in to comment.