forked from lavina/lavina
fmt
This commit is contained in:
parent
2fa1ddb7e6
commit
825d41fa3a
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
use quick_xml::events::Event;
|
use quick_xml::events::Event;
|
||||||
|
|
||||||
use lavina_core::LavinaCore;
|
|
||||||
use lavina_core::room::RoomId;
|
use lavina_core::room::RoomId;
|
||||||
|
use lavina_core::LavinaCore;
|
||||||
use proto_xmpp::bind::{BindRequest, BindResponse, Jid, Name, Server};
|
use proto_xmpp::bind::{BindRequest, BindResponse, Jid, Name, Server};
|
||||||
use proto_xmpp::client::{Iq, IqError, IqErrorType, IqType};
|
use proto_xmpp::client::{Iq, IqError, IqErrorType, IqType};
|
||||||
use proto_xmpp::disco::{Feature, Identity, InfoQuery, Item, ItemQuery};
|
use proto_xmpp::disco::{Feature, Identity, InfoQuery, Item, ItemQuery};
|
||||||
|
|
|
@ -85,9 +85,9 @@ impl<'a> XmppConnection<'a> {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use anyhow::Result;
|
|
||||||
use crate::testkit::{expect_user_authenticated, TestServer};
|
use crate::testkit::{expect_user_authenticated, TestServer};
|
||||||
use crate::Authenticated;
|
use crate::Authenticated;
|
||||||
|
use anyhow::Result;
|
||||||
use lavina_core::player::PlayerId;
|
use lavina_core::player::PlayerId;
|
||||||
use proto_xmpp::bind::{Jid, Name, Resource, Server};
|
use proto_xmpp::bind::{Jid, Name, Resource, Server};
|
||||||
use proto_xmpp::client::Presence;
|
use proto_xmpp::client::Presence;
|
||||||
|
|
|
@ -29,11 +29,7 @@ pub struct ServerConfig {
|
||||||
pub listen_on: SocketAddr,
|
pub listen_on: SocketAddr,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn launch(
|
pub async fn launch(config: ServerConfig, metrics: MetricsRegistry, core: LavinaCore) -> Result<Terminator> {
|
||||||
config: ServerConfig,
|
|
||||||
metrics: MetricsRegistry,
|
|
||||||
core: LavinaCore,
|
|
||||||
) -> Result<Terminator> {
|
|
||||||
log::info!("Starting the http service");
|
log::info!("Starting the http service");
|
||||||
let listener = TcpListener::bind(config.listen_on).await?;
|
let listener = TcpListener::bind(config.listen_on).await?;
|
||||||
log::debug!("Listener started");
|
log::debug!("Listener started");
|
||||||
|
|
Loading…
Reference in New Issue