Skip to content

Commit 30be537

Browse files
committed
Cleanup unneeded iter/into_iter for for-loops.
1 parent b279fa0 commit 30be537

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/reading.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn main() {
4444
Tag::XResolution,
4545
Tag::ImageDescription,
4646
Tag::DateTime];
47-
for &tag in tag_list.iter() {
47+
for tag in tag_list {
4848
if let Some(field) = exif.get_field(tag, In::PRIMARY) {
4949
println!("{}: {}",
5050
field.tag, field.display_value().with_unit(&exif));

src/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ mod tests {
857857
(12, 2, b"\x00\x00\x00\x00\x00\x00\x04\x40\
858858
\x00\x00\x00\x00\x00\x00\xe0\xbf".to_vec())),
859859
];
860-
for (val, be, le) in patterns.into_iter() {
860+
for (val, be, le) in patterns {
861861
assert_eq!(compose_value::<BigEndian>(&val).unwrap(), be);
862862
assert_eq!(compose_value::<LittleEndian>(&val).unwrap(), le);
863863
}

0 commit comments

Comments
 (0)