Use next instead of nth(0)
As suggested by clippy we can use `.next()` on an iterator instead of `nth(0)`. Although arguably no clearer, and certainly no worse, it keeps clippy quiet and a clean lint is a good thing.
This commit is contained in:
@@ -1942,7 +1942,7 @@ mod test {
|
|||||||
|
|
||||||
assert_eq!(psbt.inputs[0].bip32_derivation.len(), 1);
|
assert_eq!(psbt.inputs[0].bip32_derivation.len(), 1);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
psbt.inputs[0].bip32_derivation.values().nth(0).unwrap(),
|
psbt.inputs[0].bip32_derivation.values().next().unwrap(),
|
||||||
&(
|
&(
|
||||||
Fingerprint::from_str("d34db33f").unwrap(),
|
Fingerprint::from_str("d34db33f").unwrap(),
|
||||||
DerivationPath::from_str("m/44'/0'/0'/0/0").unwrap()
|
DerivationPath::from_str("m/44'/0'/0'/0/0").unwrap()
|
||||||
@@ -1968,7 +1968,7 @@ mod test {
|
|||||||
|
|
||||||
assert_eq!(psbt.outputs[0].bip32_derivation.len(), 1);
|
assert_eq!(psbt.outputs[0].bip32_derivation.len(), 1);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
psbt.outputs[0].bip32_derivation.values().nth(0).unwrap(),
|
psbt.outputs[0].bip32_derivation.values().next().unwrap(),
|
||||||
&(
|
&(
|
||||||
Fingerprint::from_str("d34db33f").unwrap(),
|
Fingerprint::from_str("d34db33f").unwrap(),
|
||||||
DerivationPath::from_str("m/44'/0'/0'/0/5").unwrap()
|
DerivationPath::from_str("m/44'/0'/0'/0/5").unwrap()
|
||||||
|
|||||||
Reference in New Issue
Block a user