Move ClientFeature to feature module

xmppftw created

Change summary

xmpp/src/feature.rs | 13 +++++++++++++
xmpp/src/lib.rs     | 10 ++--------
2 files changed, 15 insertions(+), 8 deletions(-)

Detailed changes

xmpp/src/feature.rs 🔗

@@ -0,0 +1,13 @@
+// Copyright (c) 2023 xmpp-rs contributors.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#[derive(PartialEq)]
+pub enum ClientFeature {
+    #[cfg(feature = "avatars")]
+    Avatars,
+    ContactList,
+    JoinRooms,
+}

xmpp/src/lib.rs 🔗

@@ -33,6 +33,7 @@ pub use tokio_xmpp::{BareJid, Element, FullJid, Jid};
 extern crate log;
 
 pub mod builder;
+pub mod feature;
 pub mod iq;
 pub mod message;
 pub mod presence;
@@ -41,19 +42,12 @@ pub mod upload;
 
 // Module re-exports
 pub use builder::{ClientBuilder, ClientType};
+pub use feature::ClientFeature;
 
 pub type Error = tokio_xmpp::Error;
 pub type Id = Option<String>;
 pub type RoomNick = String;
 
-#[derive(PartialEq)]
-pub enum ClientFeature {
-    #[cfg(feature = "avatars")]
-    Avatars,
-    ContactList,
-    JoinRooms,
-}
-
 #[derive(Debug)]
 pub enum Event {
     Online,