factorize internal error macro

This commit is contained in:
marin postma 2021-06-15 17:55:27 +02:00
parent 02277ec2cf
commit 0d3fb5ee0d
No known key found for this signature in database
GPG key ID: 6088B7721C3E39F9
11 changed files with 62 additions and 84 deletions

View file

@ -20,18 +20,6 @@ pub enum UpdateActorError {
FatalUpdateStoreError,
}
macro_rules! internal_error {
($($other:path), *) => {
$(
impl From<$other> for UpdateActorError {
fn from(other: $other) -> Self {
Self::Internal(Box::new(other))
}
}
)*
}
}
impl<T> From<tokio::sync::mpsc::error::SendError<T>> for UpdateActorError {
fn from(_: tokio::sync::mpsc::error::SendError<T>) -> Self {
Self::FatalUpdateStoreError