[pbs-devel] [PATCH proxmox 4/4] fix typos in strings

Maximiliano Sandoval m.sandoval at proxmox.com
Thu Jul 18 15:05:34 CEST 2024


Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxmox-auth-api/examples/passwd.rs |  2 +-
 proxmox-client/src/client.rs        |  4 ++--
 proxmox-router/src/cli/command.rs   |  2 +-
 proxmox-router/tests/docs.rs        |  2 +-
 proxmox-schema/src/schema.rs        |  4 ++--
 proxmox-schema/tests/schema.rs      |  4 ++--
 proxmox-section-config/src/lib.rs   |  2 +-
 proxmox-tfa/src/totp.rs             |  2 +-
 proxmox-time/src/daily_duration.rs  | 10 +++++-----
 9 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/proxmox-auth-api/examples/passwd.rs b/proxmox-auth-api/examples/passwd.rs
index 0f9921bc..27816271 100644
--- a/proxmox-auth-api/examples/passwd.rs
+++ b/proxmox-auth-api/examples/passwd.rs
@@ -25,7 +25,7 @@ async fn run() -> Result<(), Error> {
         None => bail!("missing username or --check parameter"),
         Some(ck) if ck == "--check" => (
             args.next()
-                .ok_or_else(|| format_err!("expected username as paramter"))?
+                .ok_or_else(|| format_err!("expected username as parameter"))?
                 .try_into()?,
             false,
         ),
diff --git a/proxmox-client/src/client.rs b/proxmox-client/src/client.rs
index b840831d..bcbcbe73 100644
--- a/proxmox-client/src/client.rs
+++ b/proxmox-client/src/client.rs
@@ -400,7 +400,7 @@ impl HttpApiClient for Client {
         T: ?Sized + Serialize,
     {
         let params = serde_json::to_string(params)
-            .map_err(|err| Error::internal("failed to serialize parametres", err));
+            .map_err(|err| Error::internal("failed to serialize parameters", err));
 
         Box::pin(async move {
             let params = params?;
@@ -425,7 +425,7 @@ impl HttpApiClient for Client {
         T: ?Sized + Serialize,
     {
         let params = serde_json::to_string(params)
-            .map_err(|err| Error::internal("failed to serialize parametres", err));
+            .map_err(|err| Error::internal("failed to serialize parameters", err));
 
         Box::pin(async move {
             let params = params?;
diff --git a/proxmox-router/src/cli/command.rs b/proxmox-router/src/cli/command.rs
index b7875065..c1a26a6b 100644
--- a/proxmox-router/src/cli/command.rs
+++ b/proxmox-router/src/cli/command.rs
@@ -200,7 +200,7 @@ const API_METHOD_COMMAND_HELP: ApiMethod = ApiMethod::new(
                 "command",
                 true,
                 &ArraySchema::new(
-                    "Command. This may be a list in order to spefify nested sub-commands.",
+                    "Command. This may be a list in order to specify nested sub-commands.",
                     &StringSchema::new("Name.").schema(),
                 )
                 .schema(),
diff --git a/proxmox-router/tests/docs.rs b/proxmox-router/tests/docs.rs
index 00b5d65a..f23a872a 100644
--- a/proxmox-router/tests/docs.rs
+++ b/proxmox-router/tests/docs.rs
@@ -151,7 +151,7 @@ fn expected_nested_usage_text() -> &'static str {
 Get help about specified command (or sub-command).
 
 ``<command>`` : ``<string>``
-  Command. This may be a list in order to spefify nested sub-commands. Can be
+  Command. This may be a list in order to specify nested sub-commands. Can be
   specified more than once.
 
 Optional parameters:
diff --git a/proxmox-schema/src/schema.rs b/proxmox-schema/src/schema.rs
index afe5559d..5054422d 100644
--- a/proxmox-schema/src/schema.rs
+++ b/proxmox-schema/src/schema.rs
@@ -1650,7 +1650,7 @@ fn do_parse_parameter_strings(
                             }
                         }
                         _ => {
-                            errors.push(key.into(), format_err!("expected array - type missmatch"))
+                            errors.push(key.into(), format_err!("expected array - type mismatch"))
                         }
                     }
                 }
@@ -1679,7 +1679,7 @@ fn do_parse_parameter_strings(
                 Value::Array(ref mut array) => {
                     array.push(Value::String(value.to_string()));
                 }
-                _ => errors.push(key.into(), format_err!("expected array - type missmatch")),
+                _ => errors.push(key.into(), format_err!("expected array - type mismatch")),
             }
         } else {
             errors.push(
diff --git a/proxmox-schema/tests/schema.rs b/proxmox-schema/tests/schema.rs
index ed09bb18..a918f6d1 100644
--- a/proxmox-schema/tests/schema.rs
+++ b/proxmox-schema/tests/schema.rs
@@ -338,7 +338,7 @@ fn test_verify_complex_object() {
 fn test_verify_complex_array() {
     {
         const PARAM_SCHEMA: Schema =
-            ArraySchema::new("Integer List.", &IntegerSchema::new("Soemething").schema()).schema();
+            ArraySchema::new("Integer List.", &IntegerSchema::new("Something").schema()).schema();
 
         const SCHEMA: ObjectSchema = ObjectSchema::new(
             "Parameters.",
@@ -369,7 +369,7 @@ fn test_verify_complex_array() {
 
     {
         const PARAM_SCHEMA: Schema =
-            ArraySchema::new("Integer List.", &IntegerSchema::new("Soemething").schema())
+            ArraySchema::new("Integer List.", &IntegerSchema::new("Something").schema())
                 .min_length(1)
                 .max_length(3)
                 .schema();
diff --git a/proxmox-section-config/src/lib.rs b/proxmox-section-config/src/lib.rs
index 8ecfd987..b61ed7f2 100644
--- a/proxmox-section-config/src/lib.rs
+++ b/proxmox-section-config/src/lib.rs
@@ -702,7 +702,7 @@ impl SectionConfig {
         _data: &Value,
     ) -> Result<String, Error> {
         if type_name != section_id {
-            bail!("gut unexpexted section type");
+            bail!("gut unexpected section type");
         }
 
         Ok(format!("[{}]\n", section_id))
diff --git a/proxmox-tfa/src/totp.rs b/proxmox-tfa/src/totp.rs
index ac725804..940af542 100644
--- a/proxmox-tfa/src/totp.rs
+++ b/proxmox-tfa/src/totp.rs
@@ -227,7 +227,7 @@ impl Totp {
     pub fn builder_from_hex(secret: &str) -> Result<TotpBuilder, Error> {
         Ok(Self::builder().secret(
             hex::decode(secret)
-                .map_err(|err| Error::decode("not a valid hexademical string", err))?,
+                .map_err(|err| Error::decode("not a valid hexadecimal string", err))?,
         ))
     }
 
diff --git a/proxmox-time/src/daily_duration.rs b/proxmox-time/src/daily_duration.rs
index 8f4459d1..adcbc637 100644
--- a/proxmox-time/src/daily_duration.rs
+++ b/proxmox-time/src/daily_duration.rs
@@ -149,24 +149,24 @@ mod test {
 
         if duration.start.hour != start_h {
             bail!(
-                "start hour missmatch, extected {}, got {:?}",
+                "start hour mismatch, extected {}, got {:?}",
                 start_h,
                 duration
             );
         }
         if duration.start.minute != start_m {
             bail!(
-                "start minute missmatch, extected {}, got {:?}",
+                "start minute mismatch, extected {}, got {:?}",
                 start_m,
                 duration
             );
         }
         if duration.end.hour != end_h {
-            bail!("end hour missmatch, extected {}, got {:?}", end_h, duration);
+            bail!("end hour mismatch, extected {}, got {:?}", end_h, duration);
         }
         if duration.end.minute != end_m {
             bail!(
-                "end minute missmatch, extected {}, got {:?}",
+                "end minute mismatch, extected {}, got {:?}",
                 end_m,
                 duration
             );
@@ -174,7 +174,7 @@ mod test {
 
         if duration.days != expected_days {
             bail!(
-                "weekday missmatch, extected {:?}, got {:?}",
+                "weekday mismatch, extected {:?}, got {:?}",
                 expected_days,
                 duration
             );
-- 
2.39.2





More information about the pbs-devel mailing list