diff --git a/src/config.rs b/src/config.rs index 1960bcc..ff4d7c3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -417,7 +417,7 @@ mod read_config { Err(BunBunError::ConfigTooLarge(size)) if size as usize == size_to_write => {} Err(BunBunError::ConfigTooLarge(size)) => { - panic!("Mismatched size: {} != {}", size, size_to_write) + panic!("Mismatched size: {size} != {size_to_write}") } res => panic!("Wrong result, got {res:#?}"), } diff --git a/src/error.rs b/src/error.rs index 85249d5..2231c49 100644 --- a/src/error.rs +++ b/src/error.rs @@ -25,7 +25,7 @@ impl fmt::Display for BunBunError { Self::Parse(e) => e.fmt(f), Self::Watch(e) => e.fmt(f), Self::LoggerInit(e) => e.fmt(f), - Self::CustomProgram(msg) => write!(f, "{}", msg), + Self::CustomProgram(msg) => msg.fmt(f), Self::NoValidConfigPath => write!(f, "No valid config path was found!"), Self::InvalidConfigPath(path, reason) => { write!(f, "Failed to access {path:?}: {reason}") diff --git a/src/routes.rs b/src/routes.rs index c35450a..3bb4110 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -123,7 +123,7 @@ pub async fn hop( .status(StatusCode::OK) .body(boxed(Full::new(Bytes::from(body)))), Err(e) => { - error!("Failed to redirect user for {}: {}", path, e); + error!("Failed to redirect user for {path}: {e}"); Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) .body(boxed(Full::from("Something went wrong :(\n"))) @@ -173,7 +173,7 @@ fn resolve_hop<'a>( let args = if args.is_empty() { &[] } else { &args[1..] }.join(" "); let arg_count = arg_count - 1; if check_route(route, arg_count) { - debug!("Resolved {} with args {}", route, args); + debug!("Resolved {route} with args {args}"); return RouteResolution::Resolved { route, args }; } } @@ -183,7 +183,7 @@ fn resolve_hop<'a>( if let Some(route) = routes.get(route) { if check_route(route, arg_count) { let args = args.join(" "); - debug!("Using default route {} with args {}", route, args); + debug!("Using default route {route} with args {args}"); return RouteResolution::Resolved { route, args }; } }