diff options
Diffstat (limited to 'src/fetch.rs')
| -rw-r--r-- | src/fetch.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fetch.rs b/src/fetch.rs index 98876bc..d9689aa 100644 --- a/src/fetch.rs +++ b/src/fetch.rs @@ -31,9 +31,7 @@ fn open(url: &str) -> Result<(Body, Option<u64>)> { .timeout(std::time::Duration::from_secs(300)) .call() .map_err(|e| Error::Http(format!("{url}: {e}")))?; - let len = resp - .header("content-length") - .and_then(|v| v.parse::<u64>().ok()); + let len = resp.header("content-length").and_then(|v| v.parse::<u64>().ok()); return Ok((Body::Http(resp.into_reader()), len)); } Err(Error::invalid(format!("unsupported url scheme: {url}"))) |
