Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions base64ct/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ impl fmt::Display for InvalidLengthError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for InvalidLengthError {}
impl core::error::Error for InvalidLengthError {}

/// Invalid encoding of provided Base64 string.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
Expand All @@ -28,8 +27,7 @@ impl fmt::Display for InvalidEncodingError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for InvalidEncodingError {}
impl core::error::Error for InvalidEncodingError {}

/// Generic error, union of [`InvalidLengthError`] and [`InvalidEncodingError`].
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
Expand Down Expand Up @@ -80,5 +78,4 @@ impl From<Error> for std::io::Error {
}
}

#[cfg(feature = "std")]
impl std::error::Error for Error {}
impl core::error::Error for Error {}