src/client/http_client.rs: minor code cleanup
This commit is contained in:
parent
f889b15867
commit
bd15e96dd9
@ -660,14 +660,14 @@ impl BackupClient {
|
||||
DataBlob::encode(&contents, None, compress)?
|
||||
};
|
||||
let raw_data = blob.into_inner();
|
||||
Ok((raw_data, contents.len()))
|
||||
Ok((raw_data, contents.len() as u64))
|
||||
})
|
||||
.and_then(move |(raw_data, size)| {
|
||||
let csum = openssl::sha::sha256(&raw_data);
|
||||
let param = json!({"encoded-size": raw_data.len(), "file-name": file_name });
|
||||
h2.upload("blob", Some(param), raw_data)
|
||||
.map(move |_| {
|
||||
BackupStats { size: size as u64, csum }
|
||||
BackupStats { size, csum }
|
||||
})
|
||||
})
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user