Skip to content

Commit

Permalink
Version update
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
  • Loading branch information
Licenser authored and tremor-bot committed Oct 31, 2023
1 parent a4e5a04 commit baf6cc0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ impl From<crate::channel::TryRecvError> for Error {
}
}

impl<T> From<async_channel::SendError<T>> for Error {
fn from(e: async_channel::SendError<T>) -> Self {
Self::from(format!("{e:?}"))
}
}

impl<T> From<async_std::channel::SendError<T>> for Error {
fn from(e: async_std::channel::SendError<T>) -> Self {
Self::from(format!("{e:?}"))
Expand Down Expand Up @@ -462,4 +468,11 @@ mod test {
let r = Error::from(e);
assert_matches!(r.0, ErrorKind::S3Error(_));
}

#[test]
fn send_error() {
let e = async_channel::SendError(0u8);
let error = Error::from(e);
assert_eq!(error.to_string(), "SendError(..)".to_string(),);
}
}

0 comments on commit baf6cc0

Please sign in to comment.