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

Appearance settings

Commit fafc77b

Browse filesBrowse files
uefi: Fix clippy::unnecessary_unwrap lint
1 parent ca957ae commit fafc77b
Copy full SHA for fafc77b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed

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

Copy file name to clipboardExpand all lines: uefi/src/proto/network/http.rs
+3-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.