diff --git a/src/bot.rs b/src/bot.rs index 4614f39..7bf6951 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -104,7 +104,7 @@ impl XmppClient { ) .await } - debug!("XMPP Bot Processed Hook"); + debug!("XMPP Bot Processed Hook"); } } } diff --git a/src/main.rs b/src/main.rs index e82bd47..643d14b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,11 +28,11 @@ use crate::error::Error; use crate::hooks::Hook; use crate::web::hooks; -use log::error; use camino::Utf8PathBuf; use clap::{command, value_parser, Arg}; use hyper::{server::conn::http1, service::service_fn}; use hyper_util::rt::tokio::{TokioIo, TokioTimer}; +use log::error; use tokio::{net::TcpListener, sync::mpsc}; #[tokio::main] @@ -76,13 +76,14 @@ async fn main() -> Result { tokio::task::spawn(async move { if let Err(err) = http1::Builder::new() .timer(TokioTimer::new()) - .serve_connection(io, service_fn(|request| { - let value_tx = value_tx.clone(); - let secret = secret.clone(); - async move { - hooks(request, &secret, value_tx).await - } - })) + .serve_connection( + io, + service_fn(|request| { + let value_tx = value_tx.clone(); + let secret = secret.clone(); + async move { hooks(request, &secret, value_tx).await } + }), + ) .await { println!("Error serving connection: {:?}", err);