mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix Clippy warning: Replace map().flatten() with and_then() in http_loader.rs (#33744)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
7df18aecfe
commit
623bcde111
1 changed files with 1 additions and 2 deletions
|
@ -1142,8 +1142,7 @@ async fn http_network_or_cache_fetch(
|
|||
let content_length = http_request
|
||||
.body
|
||||
.as_ref()
|
||||
.map(|body| body.len().map(|size| size as u64))
|
||||
.flatten();
|
||||
.and_then(|body| body.len().map(|size| size as u64));
|
||||
|
||||
// Step 8.6 Let contentLengthHeaderValue be null.
|
||||
let mut content_length_header_value = None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue