Skip to content

Commit

Permalink
chore: resolve clippy complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Jun 14, 2024
1 parent 850d961 commit 3858119
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sn_transfers/src/cashnotes/spend_reason.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl SpendReason {
}
}

const MAX_CIPHER_SIZE: usize = std::u8::MAX as usize;
const MAX_CIPHER_SIZE: usize = u8::MAX as usize;
const DERIVATION_INDEX_SIZE: usize = 32;
const HASH_SIZE: usize = 32;
const CHECK_SUM_SIZE: usize = 8;
Expand Down
12 changes: 4 additions & 8 deletions sn_transfers/src/wallet/hot_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,8 @@ impl HotWallet {
std::fs::create_dir_all(&wallet_dir)?;
// Create the new wallet for this key
store_new_keypair(&wallet_dir, &key)?;
let unconfirmed_spend_requests = match get_unconfirmed_spend_requests(&wallet_dir)? {
Some(unconfirmed_spend_requests) => unconfirmed_spend_requests,
None => Default::default(),
};
let unconfirmed_spend_requests =
(get_unconfirmed_spend_requests(&wallet_dir)?).unwrap_or_default();
let watchonly_wallet = WatchOnlyWallet::load_from(&wallet_dir, key.main_pubkey())?;

Ok(Self {
Expand Down Expand Up @@ -667,10 +665,8 @@ impl HotWallet {
}
}
};
let unconfirmed_spend_requests = match get_unconfirmed_spend_requests(wallet_dir)? {
Some(unconfirmed_spend_requests) => unconfirmed_spend_requests,
None => Default::default(),
};
let unconfirmed_spend_requests =
(get_unconfirmed_spend_requests(wallet_dir)?).unwrap_or_default();
let watchonly_wallet = WatchOnlyWallet::load_from(wallet_dir, key.main_pubkey())?;

Ok(Self {
Expand Down

0 comments on commit 3858119

Please sign in to comment.