clippy: changes from nightly clippy

all of this is embeding teh var into teh format macro
This commit is contained in:
silver 2025-07-21 00:50:20 +01:00
parent 9d409e3692
commit d0726169ee
Signed by untrusted user: silver
GPG key ID: 36F93D61BAD3FD7D
17 changed files with 47 additions and 47 deletions

View file

@ -225,7 +225,7 @@ pub async fn db_init(config: &Config) -> Result<Pool<Sqlite>, Error> {
let pool = SqlitePoolOptions::new()
.max_connections(5)
.connect_with(
SqliteConnectOptions::from_str(&format!("sqlite://{}", database))?
SqliteConnectOptions::from_str(&format!("sqlite://{database}"))?
.foreign_keys(true)
.create_if_missing(true),
)

View file

@ -152,7 +152,7 @@ pub async fn get_minecraft_config_server(db: &Pool<Sqlite>, g_id: GuildId) -> Ve
}
pub async fn whitelist_update(add: &Vec<(String, bool)>, server: &str, token: &str) {
println!("Update whitelist for {}", server);
println!("Update whitelist for {server}");
let url_base = format!("https://panel.games.skynet.ie/api/client/servers/{server}");
let bearer = format!("Bearer {token}");

View file

@ -179,7 +179,7 @@ impl Renderer {
}
fn set_color(&self, svg: &str, color: &String) -> String {
svg.replace("fill=\"currentColor\"", &format!("fill=\"#{}\"", color))
svg.replace("fill=\"currentColor\"", &format!("fill=\"#{color}\""))
}
fn get_svg_data(&self, fi: &Path) -> Result<String> {

View file

@ -71,7 +71,7 @@ pub mod normal {
}
if let Err(e) = member.add_roles(ctx, &roles).await {
println!("{:?}", e);
println!("{e:?}");
}
} else {
// old and never
@ -86,13 +86,13 @@ pub mod normal {
roles_set.current_rem += 1;
// if theya re not a current member and have the role then remove it
if let Err(e) = member.remove_role(ctx, role_current).await {
println!("{:?}", e);
println!("{e:?}");
}
}
}
for role in remove_roles.iter().flatten() {
if let Err(e) = member.remove_role(ctx, role).await {
println!("{:?}", e);
println!("{e:?}");
}
}
}
@ -148,7 +148,7 @@ pub mod normal {
Ok(_) => {}
Err(e) => {
println!("Failure to insert into {}", server.get());
println!("{:?}", e);
println!("{e:?}");
}
}
}
@ -471,8 +471,8 @@ pub mod committee {
{
Ok(_) => {}
Err(e) => {
println!("Failure to insert into Wolves {:?}", role);
println!("{:?}", e);
println!("Failure to insert into Wolves {role:?}");
println!("{e:?}");
}
}
}
@ -489,7 +489,7 @@ pub mod committee {
.await
.unwrap_or_else(|e| {
println!("Failure to get Roles from committee_roles");
println!("{:?}", e);
println!("{e:?}");
vec![]
})
}

View file

@ -38,8 +38,8 @@ async fn add_users_wolves(db: &Pool<Sqlite>, user: &WolvesResultUserMin) {
{
Ok(_) => {}
Err(e) => {
println!("Failure to insert into Wolves {:?}", user);
println!("{:?}", e);
println!("Failure to insert into Wolves {user:?}");
println!("{e:?}");
}
}
}
@ -145,7 +145,7 @@ pub mod cns {
Ok(_) => {}
Err(e) => {
println!("Failure to set server name {}", server.get());
println!("{:?}", e);
println!("{e:?}");
}
}
}
@ -184,7 +184,7 @@ pub mod cns {
Ok(_) => {}
Err(e) => {
println!("Failure to insert into ServerMembers {} {:?}", server.get(), user);
println!("{:?}", e);
println!("{e:?}");
}
}
}
@ -263,8 +263,8 @@ pub mod committees {
{
Ok(_) => {}
Err(e) => {
println!("Failure to insert into Committees {:?}", committee);
println!("{:?}", e);
println!("Failure to insert into Committees {committee:?}");
println!("{e:?}");
}
}
}