Skip to content

Commit

Permalink
Use slice::iter instead of into_iter to avoid future breakage
Browse files Browse the repository at this point in the history
`an_array.into_iter()` currently just works because of the autoref
feature, which then calls `<[T] as IntoIterator>::into_iter`. But
in the future, arrays will implement `IntoIterator`, too. In order
to avoid problems in the future, the call is replaced by `iter()`
which is shorter and more explicit.
  • Loading branch information
LukasKalbertodt committed Oct 30, 2019
1 parent ae450b8 commit 5c25806
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/read/cfi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5477,7 +5477,7 @@ mod tests {
(Register(0), RegisterRule::Offset(8)),
(Register(3), RegisterRule::Offset(4)),
]
.into_iter()
.iter()
.collect();
assert_eq!(table.ctx.initial_rules, expected_initial_rules);

Expand All @@ -5495,7 +5495,7 @@ mod tests {
(Register(0), RegisterRule::Offset(8)),
(Register(3), RegisterRule::Offset(4)),
]
.into_iter()
.iter()
.collect(),
};
assert_eq!(Some(&expected), row);
Expand All @@ -5515,7 +5515,7 @@ mod tests {
(Register(0), RegisterRule::Offset(-16)),
(Register(3), RegisterRule::Offset(4)),
]
.into_iter()
.iter()
.collect(),
};
assert_eq!(Some(&expected), row);
Expand All @@ -5535,7 +5535,7 @@ mod tests {
(Register(0), RegisterRule::Offset(-16)),
(Register(3), RegisterRule::Offset(-4)),
]
.into_iter()
.iter()
.collect(),
};
assert_eq!(Some(&expected), row);
Expand All @@ -5556,7 +5556,7 @@ mod tests {
(Register(3), RegisterRule::Offset(-4)),
(Register(5), RegisterRule::Offset(4)),
]
.into_iter()
.iter()
.collect(),
};
assert_eq!(Some(&expected), row);
Expand Down Expand Up @@ -5687,7 +5687,7 @@ mod tests {
offset: -12,
},
registers: [(Register(0), RegisterRule::Offset(-16))]
.into_iter()
.iter()
.collect(),
}
);
Expand Down

0 comments on commit 5c25806

Please sign in to comment.