diff --git a/frameworks/Rust/axum/src/database_pg.rs b/frameworks/Rust/axum/src/database_pg.rs index 3526a75de3a..56e07553af3 100644 --- a/frameworks/Rust/axum/src/database_pg.rs +++ b/frameworks/Rust/axum/src/database_pg.rs @@ -45,7 +45,7 @@ impl PgConnection { // Spawn connection tokio::spawn(async move { if let Err(error) = conn.await { - eprintln!("Connection error: {}", error); + eprintln!("Connection error: {error}"); } }); @@ -59,14 +59,14 @@ impl PgConnection { q.push_str("UPDATE world SET randomnumber = CASE id "); for _ in 1..=num { - let _ = write!(q, "when ${} then ${} ", pl, pl + 1); + let _ = write!(q, "when ${pl} then ${} ", pl + 1); pl += 2; } q.push_str("ELSE randomnumber END WHERE id IN ("); for _ in 1..=num { - let _ = write!(q, "${},", pl); + let _ = write!(q, "${pl},"); pl += 1; } diff --git a/frameworks/Rust/axum/src/server.rs b/frameworks/Rust/axum/src/server.rs index 118f35c8d83..29e165f6f5c 100644 --- a/frameworks/Rust/axum/src/server.rs +++ b/frameworks/Rust/axum/src/server.rs @@ -27,7 +27,7 @@ fn reuse_listener(addr: SocketAddr) -> io::Result { #[cfg(unix)] { if let Err(e) = socket.set_reuseport(true) { - eprintln!("error setting SO_REUSEPORT: {}", e); + eprintln!("error setting SO_REUSEPORT: {e}"); } } diff --git a/frameworks/Rust/axum/src/utils.rs b/frameworks/Rust/axum/src/utils.rs index a8f0b005d0e..89ecaeae6ab 100644 --- a/frameworks/Rust/axum/src/utils.rs +++ b/frameworks/Rust/axum/src/utils.rs @@ -13,9 +13,9 @@ where ::Err: Debug, { env::var(key) - .unwrap_or_else(|_| panic!("{} environment variable was not set", key)) + .unwrap_or_else(|_| panic!("{key} environment variable was not set")) .parse::() - .unwrap_or_else(|_| panic!("could not parse {}", key)) + .unwrap_or_else(|_| panic!("could not parse {key}")) } #[derive(Debug, Deserialize)]