From b268e88ba31b172282f2c3556099a667622d7b24 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Fri, 11 Jul 2025 10:20:10 -0700 Subject: [PATCH] virtio-devices: remove unnecessary parentheses Cargo fuzz build report an warning: warning: unnecessary parentheses around closure body --> virtio-devices/src/iommu.rs:578:41 | 578 |.retain(|&x, _| (x < req.virt_start || x > req.virt_end)); | ^ | = note: `#[warn(unused_parens)]` on by default help: remove these parentheses | 578 -.retain(|&x, _| (x < req.virt_start || x > req.virt_end)); 578 +.retain(|&x, _| x < req.virt_start || x > req.virt_end); | warning: `virtio-devices` (lib) generated 1 warning (run `cargo fix --lib -p virtio-devices` to apply 1 suggestion) Signed-off-by: Muminul Islam --- virtio-devices/src/iommu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio-devices/src/iommu.rs b/virtio-devices/src/iommu.rs index 6a0ccd6be..cdf9e5908 100644 --- a/virtio-devices/src/iommu.rs +++ b/virtio-devices/src/iommu.rs @@ -575,7 +575,7 @@ impl Request { .get_mut(&domain_id) .unwrap() .mappings - .retain(|&x, _| (x < req.virt_start || x > req.virt_end)); + .retain(|&x, _| x < req.virt_start || x > req.virt_end); } VIRTIO_IOMMU_T_PROBE => { if desc_size_left != size_of::() {