From 987e5f5413cb6fe340626a68e629b8e1f8744891 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 27 Feb 2024 21:03:34 -0800 Subject: [PATCH] Address clippy warnings --- native/src/boot/cpio.rs | 2 +- native/src/boot/payload.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/native/src/boot/cpio.rs b/native/src/boot/cpio.rs index 30509c95a..8a1ad1347 100644 --- a/native/src/boot/cpio.rs +++ b/native/src/boot/cpio.rs @@ -617,7 +617,7 @@ pub fn cpio_commands(argc: i32, argv: *const *const c_char) -> bool { return Err(log_err!("invalid arguments")); } cpio.extract( - paths.get(0).map(|x| x.as_str()), + paths.first().map(|x| x.as_str()), paths.get(1).map(|x| x.as_str()), )?; } diff --git a/native/src/boot/payload.rs b/native/src/boot/payload.rs index 50eaddac7..0be68152c 100644 --- a/native/src/boot/payload.rs +++ b/native/src/boot/payload.rs @@ -140,7 +140,7 @@ fn do_extract_boot_from_payload( let out_offset = operation .dst_extents - .get(0) + .first() .ok_or_else(|| bad_payload!("dst extents not found"))? .start_block .ok_or_else(|| bad_payload!("start block not found"))?