client: don't use debug format for printing BackupRepository

It implements the fmt::Display  trait after all

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-07-23 09:43:20 +02:00
parent f40b4fb05a
commit 5b32820e93
1 changed files with 4 additions and 4 deletions

View File

@ -1037,14 +1037,14 @@ async fn create_backup(
for (backup_type, filename, target, size) in upload_list { for (backup_type, filename, target, size) in upload_list {
match backup_type { match backup_type {
BackupSpecificationType::CONFIG => { BackupSpecificationType::CONFIG => {
println!("Upload config file '{}' to '{:?}' as {}", filename, repo, target); println!("Upload config file '{}' to '{}' as {}", filename, repo, target);
let stats = client let stats = client
.upload_blob_from_file(&filename, &target, true, crypt_mode == CryptMode::Encrypt) .upload_blob_from_file(&filename, &target, true, crypt_mode == CryptMode::Encrypt)
.await?; .await?;
manifest.add_file(target, stats.size, stats.csum, crypt_mode)?; manifest.add_file(target, stats.size, stats.csum, crypt_mode)?;
} }
BackupSpecificationType::LOGFILE => { // fixme: remove - not needed anymore ? BackupSpecificationType::LOGFILE => { // fixme: remove - not needed anymore ?
println!("Upload log file '{}' to '{:?}' as {}", filename, repo, target); println!("Upload log file '{}' to '{}' as {}", filename, repo, target);
let stats = client let stats = client
.upload_blob_from_file(&filename, &target, true, crypt_mode == CryptMode::Encrypt) .upload_blob_from_file(&filename, &target, true, crypt_mode == CryptMode::Encrypt)
.await?; .await?;
@ -1059,7 +1059,7 @@ async fn create_backup(
} }
let catalog = catalog.as_ref().unwrap(); let catalog = catalog.as_ref().unwrap();
println!("Upload directory '{}' to '{:?}' as {}", filename, repo, target); println!("Upload directory '{}' to '{}' as {}", filename, repo, target);
catalog.lock().unwrap().start_directory(std::ffi::CString::new(target.as_str())?.as_c_str())?; catalog.lock().unwrap().start_directory(std::ffi::CString::new(target.as_str())?.as_c_str())?;
let stats = backup_directory( let stats = backup_directory(
&client, &client,
@ -1137,7 +1137,7 @@ async fn create_backup(
.map_err(|err| format_err!("unable to format manifest - {}", err))?; .map_err(|err| format_err!("unable to format manifest - {}", err))?;
println!("Upload index.json to '{:?}'", repo); println!("Upload index.json to '{}'", repo);
client client
.upload_blob_from_data(manifest.into_bytes(), MANIFEST_BLOB_NAME, true, false) .upload_blob_from_data(manifest.into_bytes(), MANIFEST_BLOB_NAME, true, false)
.await?; .await?;