From 19404456716885b5a2d15535ce547cf3baa89833 Mon Sep 17 00:00:00 2001 From: Dylan Reid Date: Wed, 3 May 2023 21:09:19 -0700 Subject: [PATCH] riscv64: Fix clippy lint In preparation for enabling tools/clippy to check riscv, clean up the warning in the hypervisor crate. Change-Id: I8b1c6ff54548ee5a3752fb453a4030b7d4582364 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4505757 Reviewed-by: Dennis Kempin Commit-Queue: Dennis Kempin --- riscv64/src/fdt.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/riscv64/src/fdt.rs b/riscv64/src/fdt.rs index b8adf8a564..efe3263c21 100644 --- a/riscv64/src/fdt.rs +++ b/riscv64/src/fdt.rs @@ -227,7 +227,7 @@ fn create_pci_nodes( // and "PCI Bus Binding to IEEE Std 1275-1994". let ranges: Vec = ranges .iter() - .map(|r| { + .flat_map(|r| { let ss = r.space as u32; let p = r.prefetchable as u32; [ @@ -243,7 +243,6 @@ fn create_pci_nodes( r.size as u32, ] }) - .flatten() .collect(); let bus_range = [0, 0]; // Only bus 0