From 0282a8905cbc529fdbf7ab3cac57ef244ff6e6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 10 Sep 2022 18:33:57 +0200 Subject: [PATCH] Change pub(crate) into pub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modules aren't publicly exported anyway so it should be about the same. Signed-off-by: Maxime “pep” Buquet --- src/handlers.rs | 2 +- src/types.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/handlers.rs b/src/handlers.rs index d8ce3f5..1e47edc 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -147,7 +147,7 @@ async fn handle_message( Ok(()) } -pub(crate) async fn handle_stanza( +pub async fn handle_stanza( component: &mut C, rooms: &mut HashMap, ) -> Result<(), Error> { diff --git a/src/types.rs b/src/types.rs index e5ffc9f..ecc6517 100644 --- a/src/types.rs +++ b/src/types.rs @@ -33,23 +33,23 @@ use xmpp_parsers::{ BareJid, FullJid, Jid, }; -pub(crate) type Nick = String; +pub type Nick = String; #[derive(Debug)] -pub(crate) struct Room { +pub struct Room { jid: BareJid, occupants: HashMap, } impl Room { - pub(crate) fn new(jid: BareJid) -> Self { + pub fn new(jid: BareJid) -> Self { Room { jid, occupants: HashMap::new(), } } - pub(crate) async fn add_session( + pub async fn add_session( &mut self, component: &mut C, realjid: FullJid, @@ -118,7 +118,7 @@ impl Room { } #[derive(Debug, Clone)] -pub(crate) struct Occupant { +pub struct Occupant { jid: BareJid, nick: Nick, sessions: Vec, @@ -133,7 +133,7 @@ impl Occupant { } } - pub(crate) fn add_session(&mut self, fulljid: FullJid) -> Result<(), Error> { + pub fn add_session(&mut self, fulljid: FullJid) -> Result<(), Error> { if BareJid::from(fulljid.clone()) != self.jid { return Err(Error::MismatchJids(Jid::from(fulljid.clone()))); }