Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
oleonardolima committed May 15, 2024
1 parent f0f9bfd commit da1b5e7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mod tests {
#[serial]
fn test_enumerate() {
let devices = HWIClient::enumerate().unwrap();
assert!(devices.len() > 0);
assert!(!devices.is_empty());
}

#[test]
Expand All @@ -82,7 +82,7 @@ mod tests {
.expect("No devices found. Either plug in a hardware wallet, or start a simulator.")
.as_ref()
.expect("Error when opening the first device");
HWIClient::get_client(&device, true, TESTNET).unwrap()
HWIClient::get_client(device, true, TESTNET).unwrap()
}

#[test]
Expand Down Expand Up @@ -118,8 +118,8 @@ mod tests {
let client = get_first_device();
let account = Some(10);
let descriptor = client.get_descriptors::<String>(account).unwrap();
assert!(descriptor.internal.len() > 0);
assert!(descriptor.receive.len() > 0);
assert!(!descriptor.internal.is_empty());
assert!(!descriptor.receive.is_empty());
}

#[test]
Expand Down Expand Up @@ -198,7 +198,7 @@ mod tests {
fn test_sign_tx() {
let devices = HWIClient::enumerate().unwrap();
let device = devices.first().unwrap().as_ref().unwrap();
let client = HWIClient::get_client(&device, true, TESTNET).unwrap();
let client = HWIClient::get_client(device, true, TESTNET).unwrap();
let derivation_path = DerivationPath::from_str("m/44'/1'/0'/0/0").unwrap();

let address = client
Expand Down Expand Up @@ -236,7 +236,7 @@ mod tests {
input: vec![previous_txin],
output: vec![TxOut {
value: Amount::from_sat(50),
script_pubkey: script_pubkey,
script_pubkey,
}],
},
xpub: Default::default(),
Expand Down

0 comments on commit da1b5e7

Please sign in to comment.