mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Fix clippy lints
This PR fixes some clippy lints in the vmm crate. Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de> On-behalf-of: SAP oliver.anderson@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
0be7d1bd82
commit
8de24b5f08
@@ -408,8 +408,10 @@ fn memory_zone_get_align_size(zone: &MemoryZoneConfig) -> Result<u64, Error> {
|
||||
}
|
||||
|
||||
// The `hugepages` is enabled and the `hugepage_size` is specified, just use it directly.
|
||||
if zone.hugepages && zone.hugepage_size.is_some() {
|
||||
return Ok(zone.hugepage_size.unwrap());
|
||||
if let Some(hugepage_size) = zone.hugepage_size
|
||||
&& zone.hugepages
|
||||
{
|
||||
return Ok(hugepage_size);
|
||||
}
|
||||
|
||||
// There are two scenarios here:
|
||||
|
||||
Reference in New Issue
Block a user