]> git.proxmox.com Git - proxmox-backup.git/commitdiff
src/client/http_client.rs: minor code cleanup
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 6 Aug 2019 09:46:15 +0000 (11:46 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 6 Aug 2019 09:46:15 +0000 (11:46 +0200)
src/client/http_client.rs

index ee7202a8f0b0ecf27de5a4cd03eb12ba050524dc..6718bf2668aa1e39ba81244d643c8a5d1c8fb2ee 100644 (file)
@@ -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 }
                             })
                     })
             });