mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
build: treewide: clippy: collapse nested ifs, use let chains
This bumps the MSRV to 1.88 (also, Rust edition 2024 is mandatory). Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Bo Chen
parent
f73a6c8d8e
commit
c995b72384
@@ -428,11 +428,11 @@ pub fn load_igvm(
|
||||
let gpas_grouped = gpas
|
||||
.iter()
|
||||
.fold(Vec::<Vec<GpaPages>>::new(), |mut acc, gpa| {
|
||||
if let Some(last_vec) = acc.last_mut() {
|
||||
if last_vec[0].page_type == gpa.page_type {
|
||||
last_vec.push(*gpa);
|
||||
return acc;
|
||||
}
|
||||
if let Some(last_vec) = acc.last_mut()
|
||||
&& last_vec[0].page_type == gpa.page_type
|
||||
{
|
||||
last_vec.push(*gpa);
|
||||
return acc;
|
||||
}
|
||||
acc.push(vec![*gpa]);
|
||||
acc
|
||||
|
||||
Reference in New Issue
Block a user