We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca957ae commit fafc77bCopy full SHA for fafc77b
uefi/src/proto/network/http.rs
@@ -227,10 +227,9 @@ impl HttpHelper {
227
tx_msg.data.request = &mut tx_req;
228
tx_msg.header_count = tx_hdr.len();
229
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>();
+ if let Some(body) = body {
+ tx_msg.body_length = body.len();
+ tx_msg.body = body.as_mut_ptr().cast::<c_void>();
234
}
235
236
let mut tx_token = HttpToken {
0 commit comments