From 9ea19852b51054697bb02ab000d88340c44410a7 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 25 Nov 2020 16:22:41 +0000 Subject: [PATCH] arch: x86_64: Fix clippy issues inside tests Found by: cargo clippy --all-features --all --tests Signed-off-by: Rob Bradford --- arch/src/x86_64/mod.rs | 2 +- arch/src/x86_64/regs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index ba9c131bc..c39870070 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -991,7 +991,7 @@ mod tests { #[test] fn test_system_configuration() { let no_vcpus = 4; - let gm = GuestMemoryMmap::from_ranges(&vec![(GuestAddress(0), 0x10000)]).unwrap(); + let gm = GuestMemoryMmap::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap(); let config_err = configure_system( &gm, GuestAddress(0), diff --git a/arch/src/x86_64/regs.rs b/arch/src/x86_64/regs.rs index 0d2543306..344fa5481 100644 --- a/arch/src/x86_64/regs.rs +++ b/arch/src/x86_64/regs.rs @@ -264,7 +264,7 @@ mod tests { use vm_memory::{GuestAddress, GuestMemoryMmap}; fn create_guest_mem() -> GuestMemoryMmap { - GuestMemoryMmap::from_ranges(&vec![(GuestAddress(0), 0x10000)]).unwrap() + GuestMemoryMmap::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap() } fn read_u64(gm: &GuestMemoryMmap, offset: GuestAddress) -> u64 {