From ec49c284253cb9e359642edc2d2416c230b8e356 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Sun, 27 Dec 2020 23:00:21 -0700 Subject: [PATCH] Move pub/sub to it's own module --- src/lib.rs | 6 ++---- src/pub_sub/mod.rs | 5 +++++ src/{ => pub_sub}/publication.rs | 0 src/{ => pub_sub}/subscription.rs | 0 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/pub_sub/mod.rs rename src/{ => pub_sub}/publication.rs (100%) rename src/{ => pub_sub}/subscription.rs (100%) diff --git a/src/lib.rs b/src/lib.rs index 10cfd1f..d14705a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,14 +1,12 @@ mod broker_task; mod message; -mod publication; -mod subscription; +mod pub_sub; use broker_task::{ AdvertiseRequest, BrokerError, BrokerRequestSender, BrokerResult, BrokerTask, SubscribeRequest, }; pub use message::Message; -pub use publication::{Publication, PublishError}; -pub use subscription::{Subscription, SubscriptionError}; +pub use pub_sub::*; use futures::executor::block_on; use tokio::sync::oneshot; diff --git a/src/pub_sub/mod.rs b/src/pub_sub/mod.rs new file mode 100644 index 0000000..7c59e69 --- /dev/null +++ b/src/pub_sub/mod.rs @@ -0,0 +1,5 @@ +mod publication; +mod subscription; + +pub use publication::{Publication, PublishError}; +pub use subscription::{Subscription, SubscriptionError}; diff --git a/src/publication.rs b/src/pub_sub/publication.rs similarity index 100% rename from src/publication.rs rename to src/pub_sub/publication.rs diff --git a/src/subscription.rs b/src/pub_sub/subscription.rs similarity index 100% rename from src/subscription.rs rename to src/pub_sub/subscription.rs