refactor: minor changes

This commit is contained in:
Ryan 2025-03-12 22:02:58 -04:00
parent 7b76108b41
commit ac5533834d
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3
3 changed files with 3 additions and 4 deletions

View File

@ -6,7 +6,7 @@ use std::path::PathBuf;
#[derive(Parser)] #[derive(Parser)]
#[command(version = build_info::version_formatted())] #[command(version = build_info::version_formatted())]
pub struct Arguments { pub struct Arguments {
/// Path to Lua entrypoint /// Path to Lua entry point
#[arg(short, long)] #[arg(short, long)]
pub script: Option<PathBuf>, pub script: Option<PathBuf>,

View File

@ -196,9 +196,8 @@ pub async fn handle_event(client: Client, event: Event, state: State) -> Result<
return Ok(()); return Ok(());
}; };
let listener = TcpListener::bind(address).await.map_err(|error| { let listener = TcpListener::bind(address).await.inspect_err(|error| {
error!("failed to listen on {address}: {error:?}"); error!("failed to listen on {address}: {error:?}");
error
})?; })?;
debug!("http server listening on {address}"); debug!("http server listening on {address}");

View File

@ -131,7 +131,7 @@ async fn main() -> anyhow::Result<()> {
} else { } else {
Account::offline(&username) Account::offline(&username)
}, },
server.as_ref(), server,
) )
.await; .await;
eprintln!("{error}"); eprintln!("{error}");