From fafc77bc9e2a46ef9fec73b6f274f531f68c79a1 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sun, 8 Jun 2025 14:33:13 -0400 Subject: [PATCH] uefi: Fix clippy::unnecessary_unwrap lint --- uefi/src/proto/network/http.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/uefi/src/proto/network/http.rs b/uefi/src/proto/network/http.rs index ea3ab2519..4f58acefc 100644 --- a/uefi/src/proto/network/http.rs +++ b/uefi/src/proto/network/http.rs @@ -227,10 +227,9 @@ impl HttpHelper { tx_msg.data.request = &mut tx_req; tx_msg.header_count = tx_hdr.len(); tx_msg.header = tx_hdr.as_mut_ptr(); - if body.is_some() { - let b = body.unwrap(); - tx_msg.body_length = b.len(); - tx_msg.body = b.as_mut_ptr().cast::(); + if let Some(body) = body { + tx_msg.body_length = body.len(); + tx_msg.body = body.as_mut_ptr().cast::(); } let mut tx_token = HttpToken {