diff options
author | 2022-08-21 14:12:35 -0700 | |
---|---|---|
committer | 2022-08-21 14:12:35 -0700 | |
commit | 9a5c3c17d7465c68c3c68d00f1004dfc1a0e961c (patch) | |
tree | e3bac612d29c8808a943688c7569b0cbb9d92556 /rust | |
parent | 5f4151e3044dc3f6849a357c398939463f028af6 (diff) | |
download | touchpad-master.tar.gz touchpad-master.tar.zst touchpad-master.zip |
Diffstat (limited to 'rust')
-rw-r--r-- | rust/scraper/src/messaging.rs (renamed from rust/scraper/src/messaging/mod.rs) | 13 | ||||
-rw-r--r-- | rust/scraper/src/messaging/error.rs | 11 |
2 files changed, 10 insertions, 14 deletions
diff --git a/rust/scraper/src/messaging/mod.rs b/rust/scraper/src/messaging.rs index 947cab4..eea343d 100644 --- a/rust/scraper/src/messaging/mod.rs +++ b/rust/scraper/src/messaging.rs @@ -1,6 +1,3 @@ -mod error; - -use crate::messaging::error::MessagingError; use futures::StreamExt; use lapin::uri::AMQPUri; use lapin::{ @@ -10,9 +7,11 @@ use lapin::{ Connection, ConnectionProperties, }; use std::borrow::Cow; +use thiserror::Error; use tokio::{ sync::mpsc, sync::mpsc::{Receiver, Sender}, + sync::mpsc::error::SendError }; use tracing::{error, trace, warn}; @@ -149,3 +148,11 @@ impl Default for RabbitMQClientOptions { } } } + +#[derive(Error, Debug)] +enum MessagingError { + #[error(transparent)] + LapinError(#[from] lapin::Error), + #[error(transparent)] + SendError(#[from] SendError<Delivery>), +} diff --git a/rust/scraper/src/messaging/error.rs b/rust/scraper/src/messaging/error.rs deleted file mode 100644 index b68ea20..0000000 --- a/rust/scraper/src/messaging/error.rs +++ /dev/null @@ -1,11 +0,0 @@ -use lapin::message::Delivery; -use thiserror::Error; -use tokio::sync::mpsc::error::SendError; - -#[derive(Error, Debug)] -pub enum MessagingError { - #[error(transparent)] - LapinError(#[from] lapin::Error), - #[error(transparent)] - SendError(#[from] SendError<Delivery>), -} |