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:
Tobin Harding 2020-12-23 14:08:54 +11:00
parent 79cab93d49
commit 824b00c9e0
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607

View File

@ -1942,7 +1942,7 @@ mod test {
assert_eq!(psbt.inputs[0].bip32_derivation.len(), 1);
assert_eq!(
psbt.inputs[0].bip32_derivation.values().nth(0).unwrap(),
psbt.inputs[0].bip32_derivation.values().next().unwrap(),
&(
Fingerprint::from_str("d34db33f").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.values().nth(0).unwrap(),
psbt.outputs[0].bip32_derivation.values().next().unwrap(),
&(
Fingerprint::from_str("d34db33f").unwrap(),
DerivationPath::from_str("m/44'/0'/0'/0/5").unwrap()