[pbs-devel] [PATCH proxmox-backup 1/7] format: fix typo in function name

Stefan Reiter s.reiter at proxmox.com
Wed Oct 7 13:53:02 CEST 2020


Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 src/bin/proxmox-backup-client.rs | 6 +++---
 src/client/backup_writer.rs      | 2 +-
 src/tools/format.rs              | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs
index 5a6ed4fe..97398f49 100644
--- a/src/bin/proxmox-backup-client.rs
+++ b/src/bin/proxmox-backup-client.rs
@@ -1817,7 +1817,7 @@ async fn complete_server_file_name_do(param: &HashMap<String, String>) -> Vec<St
 fn complete_archive_name(arg: &str, param: &HashMap<String, String>) -> Vec<String> {
     complete_server_file_name(arg, param)
         .iter()
-        .map(|v| tools::format::strip_server_file_expenstion(&v))
+        .map(|v| tools::format::strip_server_file_extension(&v))
         .collect()
 }
 
@@ -1826,7 +1826,7 @@ pub fn complete_pxar_archive_name(arg: &str, param: &HashMap<String, String>) ->
         .iter()
         .filter_map(|name| {
             if name.ends_with(".pxar.didx") {
-                Some(tools::format::strip_server_file_expenstion(name))
+                Some(tools::format::strip_server_file_extension(name))
             } else {
                 None
             }
@@ -1839,7 +1839,7 @@ pub fn complete_img_archive_name(arg: &str, param: &HashMap<String, String>) ->
         .iter()
         .filter_map(|name| {
             if name.ends_with(".img.fidx") {
-                Some(tools::format::strip_server_file_expenstion(name))
+                Some(tools::format::strip_server_file_extension(name))
             } else {
                 None
             }
diff --git a/src/client/backup_writer.rs b/src/client/backup_writer.rs
index b3fd3703..fc0eccfc 100644
--- a/src/client/backup_writer.rs
+++ b/src/client/backup_writer.rs
@@ -262,7 +262,7 @@ impl BackupWriter {
         let archive = if self.verbose {
             archive_name.to_string()
         } else {
-            crate::tools::format::strip_server_file_expenstion(archive_name.clone())
+            crate::tools::format::strip_server_file_extension(archive_name.clone())
         };
         if archive_name != CATALOG_NAME {
             let speed: HumanByte = ((uploaded * 1_000_000) / (duration.as_micros() as usize)).into();
diff --git a/src/tools/format.rs b/src/tools/format.rs
index 98946689..c3aa791b 100644
--- a/src/tools/format.rs
+++ b/src/tools/format.rs
@@ -1,7 +1,7 @@
 use anyhow::{Error};
 use serde_json::Value;
 
-pub fn strip_server_file_expenstion(name: &str) -> String {
+pub fn strip_server_file_extension(name: &str) -> String {
 
     if name.ends_with(".didx") || name.ends_with(".fidx") || name.ends_with(".blob") {
         name[..name.len()-5].to_owned()
@@ -12,7 +12,7 @@ pub fn strip_server_file_expenstion(name: &str) -> String {
 
 pub fn render_backup_file_list(files: &[String]) -> String {
     let mut files: Vec<String> = files.iter()
-        .map(|v| strip_server_file_expenstion(&v))
+        .map(|v| strip_server_file_extension(&v))
         .collect();
 
     files.sort();
-- 
2.20.1






More information about the pbs-devel mailing list