diff --git a/gui/src/installer/step/bitcoind.rs b/gui/src/installer/step/bitcoind.rs index 6572d36d..57a5d1f2 100644 --- a/gui/src/installer/step/bitcoind.rs +++ b/gui/src/installer/step/bitcoind.rs @@ -493,7 +493,7 @@ impl DefineBitcoind { let builder = match selected_auth_type { RpcAuthType::CookieFile => { let cookie_path = rpc_auth_vals.cookie_path.value; - let cookie = std::fs::read_to_string(&cookie_path).map_err(|e| { + let cookie = std::fs::read_to_string(cookie_path).map_err(|e| { Error::Bitcoind(format!("Failed to read cookie file: {}", e)) })?; SimpleHttpTransport::builder().cookie_auth(cookie) diff --git a/gui/src/installer/step/descriptor.rs b/gui/src/installer/step/descriptor.rs index 7816c4d5..4adda8d5 100644 --- a/gui/src/installer/step/descriptor.rs +++ b/gui/src/installer/step/descriptor.rs @@ -719,7 +719,7 @@ impl EditXpubModal { .name .clone() }) - .unwrap_or_else(String::new), + .unwrap_or_default(), }, form_xpub: form::Value { valid: true, @@ -731,7 +731,7 @@ impl EditXpubModal { .key .to_string() }) - .unwrap_or_else(String::new), + .unwrap_or_default(), }, keys, path_index, diff --git a/gui/src/installer/view.rs b/gui/src/installer/view.rs index ee29d616..81a0939e 100644 --- a/gui/src/installer/view.rs +++ b/gui/src/installer/view.rs @@ -1621,14 +1621,14 @@ pub fn key_list_view<'a>( ) -> Element<'a, Message> { let bttn = Button::new(if chosen { hw::selected_hardware_wallet( - kind.map(|k| k.to_string()).unwrap_or_else(String::new), + kind.map(|k| k.to_string()).unwrap_or_default(), None::, fingerprint, Some(name), ) } else { hw::supported_hardware_wallet( - kind.map(|k| k.to_string()).unwrap_or_else(String::new), + kind.map(|k| k.to_string()).unwrap_or_default(), None::, fingerprint, Some(name), diff --git a/gui/src/loader.rs b/gui/src/loader.rs index 99441b9a..19f43033 100644 --- a/gui/src/loader.rs +++ b/gui/src/loader.rs @@ -95,7 +95,6 @@ impl Loader { .daemon_rpc_path .clone() .unwrap_or_else(|| socket_path(&datadir_path, network)); - let network = network; ( Loader { network, @@ -321,7 +320,6 @@ impl Loader { let reader = BufReader::new(file); let last_update_tip = reader .lines() - .into_iter() .filter(|l| { l.as_ref() .map(|l| l.contains("UpdateTip") || l.contains("blockheaders"))