Skip to content

Commit 459a7db

Browse files
committed
Merge rust-bitcoin#4285: chore: remove explicit into iteration
e966335 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: ACK e966335 apoelstra: ACK e966335; successfully ran local tests Tree-SHA512: 32fced1a5aba2caa6e48a2e586bf00dcf3d4b82b6b530d9c7f535b530737a40e24d5c05a7cea40747df4c7c4698ec141683b9416583b185b1ff6461f3c8f667f
2 parents e77d6b3 + e966335 commit 459a7db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitcoin/src/psbt/serialize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl Serialize for KeySource {
206206

207207
rv.append(&mut self.0.to_byte_array().to_vec());
208208

209-
for cnum in self.1.into_iter() {
209+
for cnum in &self.1 {
210210
rv.append(&mut serialize(&u32::from(*cnum)))
211211
}
212212

0 commit comments

Comments
 (0)