diff --git a/src/main.rs b/src/main.rs index 92b0ca5..c3a9380 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ struct Args { #[clap(default_value = ".")] root: String, /// Set the listener host [default: LAN IP address] - #[clap(short='s', long)] + #[clap(short = 's', long)] host: Option, /// Set the listener port #[clap(short, long, default_value_t = 8000)] diff --git a/src/server.rs b/src/server.rs index 3b3c392..619d504 100644 --- a/src/server.rs +++ b/src/server.rs @@ -113,11 +113,7 @@ async fn static_assets( log::warn!("{}", err); if mime == "text/html" { let script = format!(include_str!("templates/websocket.html"), host, port); - let html = format!( - include_str!("templates/error.html"), - script, - err.to_string() - ); + let html = format!(include_str!("templates/error.html"), script, err); response.set_body(Body::from_string(html)); if err.kind() == ErrorKind::NotFound { response.set_status(StatusCode::NotFound);