Merge rust-bitcoin/rust-bitcoin#4285: chore: remove explicit into iteration
e966335447
chore: remove explicit into iteration (jike) Pull request description: ``` warning: it is more concise to loop over containers instead of using explicit iteration methods --> bitcoin/src/psbt/serialize.rs:209:21 | 209 | for cnum in self.1.into_iter() { | ^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.1` ``` ACKs for top commit: Kixunil: ACKe966335447
apoelstra: ACK e9663354476b0b9b2ec52ce034de5ab9223f9d29; successfully ran local tests Tree-SHA512: 32fced1a5aba2caa6e48a2e586bf00dcf3d4b82b6b530d9c7f535b530737a40e24d5c05a7cea40747df4c7c4698ec141683b9416583b185b1ff6461f3c8f667f
This commit is contained in:
commit
459a7db038
|
@ -206,7 +206,7 @@ impl Serialize for KeySource {
|
||||||
|
|
||||||
rv.append(&mut self.0.to_byte_array().to_vec());
|
rv.append(&mut self.0.to_byte_array().to_vec());
|
||||||
|
|
||||||
for cnum in self.1.into_iter() {
|
for cnum in &self.1 {
|
||||||
rv.append(&mut serialize(&u32::from(*cnum)))
|
rv.append(&mut serialize(&u32::from(*cnum)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue