From 806118862fa12a5e1f4931aac0fadd78ffd72ef7 Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:27:43 +0100 Subject: [PATCH] use String::default() for empty strings as suggested by diamante quality control :tm: --- src/http_async.rs | 2 +- src/main.rs | 2 +- src/structs.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/http_async.rs b/src/http_async.rs index 7da2fc0..63e30aa 100644 --- a/src/http_async.rs +++ b/src/http_async.rs @@ -47,6 +47,6 @@ pub async fn download_file( pb.set_position(new); } - pb.set_message(""); + pb.set_message(String::default()); Ok(()) } diff --git a/src/main.rs b/src/main.rs index 5d753e4..5d34da0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -442,7 +442,7 @@ async fn main() { cfg.args = pass; arg_remove_value(&mut args, "--pass"); } else if cfg.args.is_empty() { - cfg.args = String::from(""); + cfg.args = String::default(); } let games_json = http::get_body_string(format!("{}/games.json", MASTER).as_str()); diff --git a/src/structs.rs b/src/structs.rs index 40b7af0..bf538bb 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -32,7 +32,7 @@ impl Default for Config { download_bonus_content: false, ask_bonus_content: true, force_update: false, - args: String::from(""), + args: String::default(), } } }