mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
Fix into_iter() usage where iter() suffices
Fixes warnings of the form: warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. BUG=None TEST=emerge-nami crosvm Change-Id: I2b46b55f0e967d985d04678c240604b542e27e07 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2093287 Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
a0fea29e0b
commit
63c239496d
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ impl KeycodeTranslator {
|
|||
/// Create a new KeycodeTranslator that translates from the `from_type` type to Linux keycodes.
|
||||
pub fn new(from_type: KeycodeTypes) -> KeycodeTranslator {
|
||||
let mut kcm: HashMap<u32, MapEntry> = HashMap::new();
|
||||
for entry in KEYCODE_MAP.into_iter() {
|
||||
for entry in KEYCODE_MAP.iter() {
|
||||
kcm.insert(
|
||||
match from_type {
|
||||
KeycodeTypes::XkbScancode => entry.xkb,
|
||||
|
|
|
@ -1751,7 +1751,7 @@ fn run_control(
|
|||
.map_err(Error::PollContextAdd)?;
|
||||
|
||||
if let Some(gsi_relay) = &linux.gsi_relay {
|
||||
for (gsi, evt) in gsi_relay.irqfd.into_iter().enumerate() {
|
||||
for (gsi, evt) in gsi_relay.irqfd.iter().enumerate() {
|
||||
if let Some(evt) = evt {
|
||||
poll_ctx
|
||||
.add(evt, Token::IrqFd { gsi })
|
||||
|
|
Loading…
Reference in a new issue