Change pub(crate) into pub

Modules aren't publicly exported anyway so it should be about the same.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-09-10 18:33:57 +02:00
parent 7797af95b9
commit 0282a8905c
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2
2 changed files with 7 additions and 7 deletions

View file

@ -147,7 +147,7 @@ async fn handle_message<C: ComponentTrait>(
Ok(())
}
pub(crate) async fn handle_stanza<C: ComponentTrait>(
pub async fn handle_stanza<C: ComponentTrait>(
component: &mut C,
rooms: &mut HashMap<BareJid, Room>,
) -> Result<(), Error> {

View file

@ -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<BareJid, Occupant>,
}
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<C: ComponentTrait>(
pub async fn add_session<C: ComponentTrait>(
&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<FullJid>,
@ -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())));
}