misc: Automatically fix cargo clippy issues added in 1.65 (stable)

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2022-12-14 11:41:15 +00:00
parent 8b59316718
commit 5e52729453
57 changed files with 448 additions and 574 deletions
+3 -7
View File
@@ -862,9 +862,7 @@ impl Vm {
.map_err(|_| Error::InitramfsLoad)?
.try_into()
.unwrap();
initramfs
.seek(SeekFrom::Start(0))
.map_err(|_| Error::InitramfsLoad)?;
initramfs.rewind().map_err(|_| Error::InitramfsLoad)?;
let address =
arch::initramfs_load_addr(guest_mem, size).map_err(|_| Error::InitramfsLoad)?;
@@ -1829,9 +1827,7 @@ impl Vm {
return Err(Error::InvalidPayloadType);
}
payload_file
.seek(SeekFrom::Start(0))
.map_err(Error::LoadPayload)?;
payload_file.rewind().map_err(Error::LoadPayload)?;
mem.read_from(
GuestAddress(section.address),
payload_file,
@@ -3174,7 +3170,7 @@ pub fn test_vm() {
println!("HLT");
break;
}
r => panic!("unexpected exit reason: {:?}", r),
r => panic!("unexpected exit reason: {r:?}"),
}
}
}