[pbs-devel] [PATCH proxmox 3/4] fix typos in variable and function names

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


Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxmox-notify/src/api/gotify.rs   |  4 ++--
 proxmox-notify/src/api/matcher.rs  |  4 ++--
 proxmox-notify/src/api/sendmail.rs |  4 ++--
 proxmox-notify/src/api/smtp.rs     |  4 ++--
 proxmox-router/src/cli/getopts.rs  |  2 +-
 proxmox-schema/src/schema.rs       |  8 ++++----
 proxmox-section-config/src/lib.rs  |  4 ++--
 proxmox-time/src/posix.rs          | 14 +++++++-------
 8 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/proxmox-notify/src/api/gotify.rs b/proxmox-notify/src/api/gotify.rs
index b4be7b44..27b9c317 100644
--- a/proxmox-notify/src/api/gotify.rs
+++ b/proxmox-notify/src/api/gotify.rs
@@ -85,8 +85,8 @@ pub fn update_endpoint(
     let mut endpoint = get_endpoint(config, name)?;
 
     if let Some(delete) = delete {
-        for deleteable_property in delete {
-            match deleteable_property {
+        for deletable_property in delete {
+            match deletable_property {
                 DeleteableGotifyProperty::Comment => endpoint.comment = None,
                 DeleteableGotifyProperty::Disable => endpoint.disable = None,
             }
diff --git a/proxmox-notify/src/api/matcher.rs b/proxmox-notify/src/api/matcher.rs
index fa116330..f5605acb 100644
--- a/proxmox-notify/src/api/matcher.rs
+++ b/proxmox-notify/src/api/matcher.rs
@@ -73,8 +73,8 @@ pub fn update_matcher(
     let mut matcher = get_matcher(config, name)?;
 
     if let Some(delete) = delete {
-        for deleteable_property in delete {
-            match deleteable_property {
+        for deletable_property in delete {
+            match deletable_property {
                 DeleteableMatcherProperty::MatchSeverity => matcher.match_severity.clear(),
                 DeleteableMatcherProperty::MatchField => matcher.match_field.clear(),
                 DeleteableMatcherProperty::MatchCalendar => matcher.match_calendar.clear(),
diff --git a/proxmox-notify/src/api/sendmail.rs b/proxmox-notify/src/api/sendmail.rs
index 47588afe..e0adb64b 100644
--- a/proxmox-notify/src/api/sendmail.rs
+++ b/proxmox-notify/src/api/sendmail.rs
@@ -78,8 +78,8 @@ pub fn update_endpoint(
     let mut endpoint = get_endpoint(config, name)?;
 
     if let Some(delete) = delete {
-        for deleteable_property in delete {
-            match deleteable_property {
+        for deletable_property in delete {
+            match deletable_property {
                 DeleteableSendmailProperty::FromAddress => endpoint.from_address = None,
                 DeleteableSendmailProperty::Author => endpoint.author = None,
                 DeleteableSendmailProperty::Comment => endpoint.comment = None,
diff --git a/proxmox-notify/src/api/smtp.rs b/proxmox-notify/src/api/smtp.rs
index 1b4700e6..470701bf 100644
--- a/proxmox-notify/src/api/smtp.rs
+++ b/proxmox-notify/src/api/smtp.rs
@@ -96,8 +96,8 @@ pub fn update_endpoint(
     let mut endpoint = get_endpoint(config, name)?;
 
     if let Some(delete) = delete {
-        for deleteable_property in delete {
-            match deleteable_property {
+        for deletable_property in delete {
+            match deletable_property {
                 DeleteableSmtpProperty::Author => endpoint.author = None,
                 DeleteableSmtpProperty::Comment => endpoint.comment = None,
                 DeleteableSmtpProperty::Disable => endpoint.disable = None,
diff --git a/proxmox-router/src/cli/getopts.rs b/proxmox-router/src/cli/getopts.rs
index b7bad0c3..dcb0716e 100644
--- a/proxmox-router/src/cli/getopts.rs
+++ b/proxmox-router/src/cli/getopts.rs
@@ -231,7 +231,7 @@ fn test_boolean_arg() {
 }
 
 #[test]
-fn test_argument_paramenter() {
+fn test_argument_parameter() {
     use proxmox_schema::*;
 
     const PARAMETERS: ObjectSchema = ObjectSchema::new(
diff --git a/proxmox-schema/src/schema.rs b/proxmox-schema/src/schema.rs
index eec6d81a..afe5559d 100644
--- a/proxmox-schema/src/schema.rs
+++ b/proxmox-schema/src/schema.rs
@@ -248,8 +248,8 @@ impl IntegerSchema {
         self
     }
 
-    pub const fn maximum(mut self, maximium: isize) -> Self {
-        self.maximum = Some(maximium);
+    pub const fn maximum(mut self, maximum: isize) -> Self {
+        self.maximum = Some(maximum);
         self
     }
 
@@ -323,8 +323,8 @@ impl NumberSchema {
         self
     }
 
-    pub const fn maximum(mut self, maximium: f64) -> Self {
-        self.maximum = Some(maximium);
+    pub const fn maximum(mut self, maximum: f64) -> Self {
+        self.maximum = Some(maximum);
         self
     }
 
diff --git a/proxmox-section-config/src/lib.rs b/proxmox-section-config/src/lib.rs
index 3d383880..8ecfd987 100644
--- a/proxmox-section-config/src/lib.rs
+++ b/proxmox-section-config/src/lib.rs
@@ -1007,7 +1007,7 @@ fn test_section_config_with_additional_properties() {
         default_key: None,
     };
 
-    const USER_PROPERTIES_WITH_ADDTIONAL: ObjectSchema = ObjectSchema {
+    const USER_PROPERTIES_WITH_ADDITIONAL: ObjectSchema = ObjectSchema {
         description: "user properties with additional",
         properties: &PROPERTIES,
         additional_properties: true,
@@ -1024,7 +1024,7 @@ fn test_section_config_with_additional_properties() {
     let plugin = SectionConfigPlugin::new(
         "user".to_string(),
         Some("userid".to_string()),
-        &USER_PROPERTIES_WITH_ADDTIONAL,
+        &USER_PROPERTIES_WITH_ADDITIONAL,
     );
     config_with_additional.register_plugin(plugin);
 
diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs
index 7db69928..bb60ba04 100644
--- a/proxmox-time/src/posix.rs
+++ b/proxmox-time/src/posix.rs
@@ -444,16 +444,16 @@ fn test_rfc3339_range() {
         parse_rfc3339(first_century_str).expect("parsing first century string should work");
     assert_eq!(parsed, first_century);
 
-    let first_millenium = -59011459200;
-    let first_millenium_str = "0100-01-01T00:00:00Z";
+    let first_millennium = -59011459200;
+    let first_millennium_str = "0100-01-01T00:00:00Z";
 
-    let converted = epoch_to_rfc3339_utc(first_millenium)
-        .expect("converting epoch representing first millenium year should work");
-    assert_eq!(converted, first_millenium_str);
+    let converted = epoch_to_rfc3339_utc(first_millennium)
+        .expect("converting epoch representing first millennium year should work");
+    assert_eq!(converted, first_millennium_str);
 
     let parsed =
-        parse_rfc3339(first_millenium_str).expect("parsing first millenium string should work");
-    assert_eq!(parsed, first_millenium);
+        parse_rfc3339(first_millennium_str).expect("parsing first millennium string should work");
+    assert_eq!(parsed, first_millennium);
 }
 
 #[test]
-- 
2.39.2





More information about the pbs-devel mailing list