Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fafc77b

Browse files
uefi: Fix clippy::unnecessary_unwrap lint
1 parent ca957ae commit fafc77b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎uefi/src/proto/network/http.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,9 @@ impl HttpHelper {
227227
tx_msg.data.request = &mut tx_req;
228228
tx_msg.header_count = tx_hdr.len();
229229
tx_msg.header = tx_hdr.as_mut_ptr();
230-
if body.is_some() {
231-
let b = body.unwrap();
232-
tx_msg.body_length = b.len();
233-
tx_msg.body = b.as_mut_ptr().cast::<c_void>();
230+
if let Some(body) = body {
231+
tx_msg.body_length = body.len();
232+
tx_msg.body = body.as_mut_ptr().cast::<c_void>();
234233
}
235234

236235
let mut tx_token = HttpToken {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /