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:
Oliver Anderson
2025-12-09 14:41:14 +01:00
committed by Rob Bradford
parent 0be7d1bd82
commit 8de24b5f08
2 changed files with 20 additions and 21 deletions

View File

@@ -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: