Skip to content

Commit eb38507

Browse files
committed
Do not use bool in assert_eq macro
Clippy emits: warning: used `assert_eq!` with a literal bool Use `assert` instead of `assert_eq` with a boolean.
1 parent 3c46e4c commit eb38507

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/descriptor/key.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,23 +1245,23 @@ mod test {
12451245
public_key.full_derivation_path().unwrap().to_string(),
12461246
"m/0'/1'/2"
12471247
);
1248-
assert_eq!(public_key.has_wildcard(), false);
1248+
assert!(!public_key.has_wildcard());
12491249

12501250
let public_key = DescriptorPublicKey::from_str("[abcdef00/0'/1']tpubDBrgjcxBxnXyL575sHdkpKohWu5qHKoQ7TJXKNrYznh5fVEGBv89hA8ENW7A8MFVpFUSvgLqc4Nj1WZcpePX6rrxviVtPowvMuGF5rdT2Vi/*").unwrap();
12511251
assert_eq!(public_key.master_fingerprint().to_string(), "abcdef00");
12521252
assert_eq!(
12531253
public_key.full_derivation_path().unwrap().to_string(),
12541254
"m/0'/1'"
12551255
);
1256-
assert_eq!(public_key.has_wildcard(), true);
1256+
assert!(public_key.has_wildcard());
12571257

12581258
let public_key = DescriptorPublicKey::from_str("[abcdef00/0'/1']tpubDBrgjcxBxnXyL575sHdkpKohWu5qHKoQ7TJXKNrYznh5fVEGBv89hA8ENW7A8MFVpFUSvgLqc4Nj1WZcpePX6rrxviVtPowvMuGF5rdT2Vi/*h").unwrap();
12591259
assert_eq!(public_key.master_fingerprint().to_string(), "abcdef00");
12601260
assert_eq!(
12611261
public_key.full_derivation_path().unwrap().to_string(),
12621262
"m/0'/1'"
12631263
);
1264-
assert_eq!(public_key.has_wildcard(), true);
1264+
assert!(public_key.has_wildcard());
12651265
}
12661266

12671267
#[test]
@@ -1276,7 +1276,7 @@ mod test {
12761276
public_key.full_derivation_path().unwrap().to_string(),
12771277
"m/0'/1'/2"
12781278
);
1279-
assert_eq!(public_key.has_wildcard(), false);
1279+
assert!(!public_key.has_wildcard());
12801280

12811281
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2'").unwrap();
12821282
let public_key = secret_key.to_public(&secp).unwrap();

0 commit comments

Comments
 (0)