1
0
mirror of https://github.com/jht5945/buildj.git synced 2026-01-12 08:20:03 +08:00

style: code style

This commit is contained in:
2020-08-02 15:58:55 +08:00
parent f21f124add
commit 4160011cab
3 changed files with 3 additions and 9 deletions

View File

@@ -9,8 +9,7 @@ pub fn download_url(url: &str, dest: &mut File) -> XResult<()> {
}
let mut response = reqwest::get(url)?;
let header_content_length: i64 = match response.headers().get("content-length") {
None => -1_i64,
Some(len_value) => {
None => -1_i64, Some(len_value) => {
let len_str = match len_value.to_str() {
Ok(len_str) => len_str, Err(err) => {
warning!("Get content length for {:?}, error: {}", len_value, err);