mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
virtio-devices,vm-allocator: Fix clippy warnings
Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
a1ce37c2af
commit
274f1aa2e7
@ -616,7 +616,9 @@ impl Block {
|
||||
(disk_nsectors, avail_features, 0, config, false)
|
||||
};
|
||||
|
||||
let serial = serial.map(Vec::from).unwrap_or(build_serial(&disk_path));
|
||||
let serial = serial
|
||||
.map(Vec::from)
|
||||
.unwrap_or_else(|| build_serial(&disk_path));
|
||||
|
||||
Ok(Block {
|
||||
common: VirtioCommon {
|
||||
|
@ -119,7 +119,7 @@ impl SystemAllocator {
|
||||
self.platform_mmio_address_space.allocate(
|
||||
address,
|
||||
size,
|
||||
Some(align_size.unwrap_or(get_page_size())),
|
||||
Some(align_size.unwrap_or_else(get_page_size)),
|
||||
)
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ impl SystemAllocator {
|
||||
self.mmio_hole_address_space.allocate(
|
||||
address,
|
||||
size,
|
||||
Some(align_size.unwrap_or(get_page_size())),
|
||||
Some(align_size.unwrap_or_else(get_page_size)),
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user