From 569961e5b7bedb8f986fadceeaf381878f3b6e84 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:47:13 +0000 Subject: [PATCH] Resolve noop_method_call warnings for rust 1.73+ - Rust compiler added warnings to noop method calls (redundant calls that do nothing) - These changes take rust compiler recommendations and accomodate them to silence warnings --- config/src/config.rs | 9 +-------- servers/src/epic/server.rs | 2 +- src/bin/epic.rs | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/config/src/config.rs b/config/src/config.rs index 2567f529..870e420e 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -239,14 +239,7 @@ impl GlobalConfig { } Err(e) => { return Err(ConfigError::ParseError( - String::from( - self.config_file_path - .as_mut() - .unwrap() - .to_str() - .unwrap() - .clone(), - ), + String::from(self.config_file_path.as_mut().unwrap().to_str().unwrap()), String::from(format!("{}", e)), )); } diff --git a/servers/src/epic/server.rs b/servers/src/epic/server.rs index 3acc202d..0a506889 100644 --- a/servers/src/epic/server.rs +++ b/servers/src/epic/server.rs @@ -185,7 +185,7 @@ impl Server { // This uses fs2 and should be safe cross-platform unless somebody abuses the file itself. fn one_epic_at_a_time(config: &ServerConfig) -> Result, Error> { let path = Path::new(&config.db_root); - fs::create_dir_all(path.clone())?; + fs::create_dir_all(path)?; let path = path.join("epic.lock"); let lock_file = fs::OpenOptions::new() .read(true) diff --git a/src/bin/epic.rs b/src/bin/epic.rs index 3af804bc..8a35fed9 100644 --- a/src/bin/epic.rs +++ b/src/bin/epic.rs @@ -100,7 +100,7 @@ fn real_main() -> i32 { panic!("The generate value must be a positive integer: {}", e); }); - let url = taxes_args.value_of("from_wallet").unwrap().clone(); + let url = taxes_args.value_of("from_wallet").unwrap(); let mut wallet_url = String::new(); if !url.contains("http") { wallet_url.push_str("http://");