From d2dc77e4a3da7670b219beecba8056a380549aa6 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 14 May 2018 21:02:22 +0200 Subject: [PATCH] pubsub: Move Subscription to the module. --- src/pubsub/event.rs | 9 +-------- src/pubsub/mod.rs | 7 +++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pubsub/event.rs b/src/pubsub/event.rs index dea11ba4..4ac75cf2 100644 --- a/src/pubsub/event.rs +++ b/src/pubsub/event.rs @@ -16,7 +16,7 @@ use ns; use data_forms::DataForm; -use pubsub::{NodeName, ItemId, SubscriptionId}; +use pubsub::{NodeName, ItemId, Subscription, SubscriptionId}; #[derive(Debug, Clone)] pub struct Item { @@ -58,13 +58,6 @@ impl From for Element { } } -generate_attribute!(Subscription, "subscription", { - None => "none", - Pending => "pending", - Subscribed => "subscribed", - Unconfigured => "unconfigured", -}, Default = None); - #[derive(Debug, Clone)] pub enum PubSubEvent { /* diff --git a/src/pubsub/mod.rs b/src/pubsub/mod.rs index 89b6f8ce..735fb9c6 100644 --- a/src/pubsub/mod.rs +++ b/src/pubsub/mod.rs @@ -11,3 +11,10 @@ pub use self::event::PubSubEvent; generate_id!(NodeName); generate_id!(ItemId); generate_id!(SubscriptionId); + +generate_attribute!(Subscription, "subscription", { + None => "none", + Pending => "pending", + Subscribed => "subscribed", + Unconfigured => "unconfigured", +}, Default = None);