Skip to content

Commit

Permalink
fix clippy errors for rust 1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
edouardparis committed Jan 22, 2024
1 parent 7ca6cc8 commit 1526d15
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gui/src/installer/step/bitcoind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions gui/src/installer/step/descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ impl EditXpubModal {
.name
.clone()
})
.unwrap_or_else(String::new),
.unwrap_or_default(),
},
form_xpub: form::Value {
valid: true,
Expand All @@ -731,7 +731,7 @@ impl EditXpubModal {
.key
.to_string()
})
.unwrap_or_else(String::new),
.unwrap_or_default(),
},
keys,
path_index,
Expand Down
4 changes: 2 additions & 2 deletions gui/src/installer/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<String>,
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::<String>,
fingerprint,
Some(name),
Expand Down
2 changes: 0 additions & 2 deletions gui/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ impl Loader {
.daemon_rpc_path
.clone()
.unwrap_or_else(|| socket_path(&datadir_path, network));
let network = network;
(
Loader {
network,
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit 1526d15

Please sign in to comment.