Skip to content

Commit 8177b20

Browse files
CopilotSteake
andcommitted
Fix code style: move import to top-level and use underscore prefix for unused variable
Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
1 parent 72707e7 commit 8177b20

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

crates/bitcell-wallet/src/mnemonic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
use crate::{Error, Result};
77
use bip39::{Language, Mnemonic as Bip39Mnemonic};
8+
use rand::RngCore;
89
use zeroize::Zeroize;
910

1011
/// Mnemonic word count options
@@ -43,7 +44,6 @@ impl Mnemonic {
4344
let mut entropy = vec![0u8; entropy_size];
4445

4546
// Use rand to generate entropy
46-
use rand::RngCore;
4747
rand::thread_rng().fill_bytes(&mut entropy);
4848

4949
let mnemonic = Bip39Mnemonic::from_entropy(&entropy)

crates/bitcell-wallet/src/wallet.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,11 @@ impl Wallet {
156156

157157
for (chain, lookahead) in chains {
158158
for i in 0..lookahead {
159-
if let Err(e) = wallet.generate_address(chain, i) {
159+
if let Err(_e) = wallet.generate_address(chain, i) {
160160
// Log warning but continue - address generation failure shouldn't
161161
// prevent wallet creation
162162
#[cfg(debug_assertions)]
163-
eprintln!("Warning: failed to generate address for chain {:?} at index {}: {}", chain, i, e);
164-
let _ = e; // Suppress unused warning in release
163+
eprintln!("Warning: failed to generate address for chain {:?} at index {}: {}", chain, i, _e);
165164
}
166165
}
167166
}

0 commit comments

Comments
 (0)