mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
factorize internal error macro
This commit is contained in:
parent
02277ec2cf
commit
0d3fb5ee0d
11 changed files with 62 additions and 84 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue