all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox 2/4] fix typos in code documentation
Date: Thu, 18 Jul 2024 15:05:32 +0200	[thread overview]
Message-ID: <20240718130534.370768-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20240718130534.370768-1-m.sandoval@proxmox.com>

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 proxmox-api-macro/src/api/method.rs  | 2 +-
 proxmox-product-config/src/init.rs   | 2 +-
 proxmox-rest-server/src/rest.rs      | 2 +-
 proxmox-router/src/cli/command.rs    | 2 +-
 proxmox-router/src/cli/completion.rs | 2 +-
 proxmox-rrd/src/cache.rs             | 2 +-
 proxmox-sys/src/fs/file.rs           | 4 ++--
 proxmox-sys/src/linux/timer.rs       | 2 +-
 proxmox-time/src/wasm.rs             | 2 +-
 proxmox-uuid/src/lib.rs              | 2 +-
 proxmox-uuid/src/wasm.rs             | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/proxmox-api-macro/src/api/method.rs b/proxmox-api-macro/src/api/method.rs
index a40a5a1c..7e2ff856 100644
--- a/proxmox-api-macro/src/api/method.rs
+++ b/proxmox-api-macro/src/api/method.rs
@@ -683,7 +683,7 @@ fn extract_normal_parameter(
             body.extend(quote_spanned! { span => ; });
         }
         Some(flatten_span) => {
-            // Flattened parameter, we need ot use our special partial-object deserializer.
+            // Flattened parameter, we need to use our special partial-object deserializer.
             // Also note that we do not support simply nesting schemas. We need a referenced type.
             // Otherwise the expanded code here gets ugly and we'd need to make sure we pull out
             // nested schemas into named variables first... No thanks.
diff --git a/proxmox-product-config/src/init.rs b/proxmox-product-config/src/init.rs
index f4247fbd..a244559a 100644
--- a/proxmox-product-config/src/init.rs
+++ b/proxmox-product-config/src/init.rs
@@ -29,7 +29,7 @@ pub fn get_api_user() -> &'static nix::unistd::User {
     }
 }
 
-// Returns the global priviledged user set with [init].
+// Returns the global privileged user set with [init].
 ///
 /// # Panics
 ///
diff --git a/proxmox-rest-server/src/rest.rs b/proxmox-rest-server/src/rest.rs
index 3a3c287c..cbc2c95a 100644
--- a/proxmox-rest-server/src/rest.rs
+++ b/proxmox-rest-server/src/rest.rs
@@ -422,7 +422,7 @@ async fn get_request_parameters<S: 'static + BuildHasher + Send>(
         std::str::from_utf8(&body).map_err(|err| format_err!("Request body not uft8: {}", err))?;
 
     if is_json {
-        // treat empty body as empty paramater hash
+        // treat empty body as empty parameter hash
         let mut params: Value = if utf8_data.is_empty() {
             Value::Object(serde_json::Map::new())
         } else {
diff --git a/proxmox-router/src/cli/command.rs b/proxmox-router/src/cli/command.rs
index 2b6c39ed..b7875065 100644
--- a/proxmox-router/src/cli/command.rs
+++ b/proxmox-router/src/cli/command.rs
@@ -147,7 +147,7 @@ fn parse_nested_command<'a>(
 ) -> Result<&'a CliCommand, Error> {
     let mut map = def;
 
-    // Note: Avoid async recursive function, because current rust compiler cant handle that
+    // Note: Avoid async recursive function, because current rust compiler can't handle that
     loop {
         replace_aliases(args, &map.aliases);
 
diff --git a/proxmox-router/src/cli/completion.rs b/proxmox-router/src/cli/completion.rs
index 487061c8..47444243 100644
--- a/proxmox-router/src/cli/completion.rs
+++ b/proxmox-router/src/cli/completion.rs
@@ -168,7 +168,7 @@ fn get_simple_completion_do(
         return Vec::new();
     }
 
-    // Try to parse all argumnets but last, record args already done
+    // Try to parse all arguments but last, record args already done
     if args.len() > 1 {
         let mut errors = ParameterError::new(); // we simply ignore any parsing errors here
         let (data, _remaining) = super::getopts::parse_argument_list(
diff --git a/proxmox-rrd/src/cache.rs b/proxmox-rrd/src/cache.rs
index 5b123a6b..de682bd0 100644
--- a/proxmox-rrd/src/cache.rs
+++ b/proxmox-rrd/src/cache.rs
@@ -300,7 +300,7 @@ fn apply_journal_lines(
                     linenr,
                     err,
                 );
-                continue; // skip unparseable lines
+                continue; // skip unparsable lines
             }
         };
 
diff --git a/proxmox-sys/src/fs/file.rs b/proxmox-sys/src/fs/file.rs
index ac513891..bf8c8c8d 100644
--- a/proxmox-sys/src/fs/file.rs
+++ b/proxmox-sys/src/fs/file.rs
@@ -218,13 +218,13 @@ pub fn atomic_open_or_create_file<P: AsRef<Path>>(
     }
 
     let exclusive = if oflag.contains(OFlag::O_EXCL) {
-        oflag.remove(OFlag::O_EXCL); // we nned to handle that ourselfes
+        oflag.remove(OFlag::O_EXCL); // we need to handle that ourselves
         true
     } else {
         false
     };
 
-    oflag.remove(OFlag::O_CREAT); // we want to handle CREAT ourselfes
+    oflag.remove(OFlag::O_CREAT); // we want to handle CREAT ourselves
 
     if !exclusive {
         // Note: 'mode' is ignored, because oflag does not contain O_CREAT or O_TMPFILE
diff --git a/proxmox-sys/src/linux/timer.rs b/proxmox-sys/src/linux/timer.rs
index 1317caaf..462af976 100644
--- a/proxmox-sys/src/linux/timer.rs
+++ b/proxmox-sys/src/linux/timer.rs
@@ -271,7 +271,7 @@ fn do_setup_timeout_handler() -> io::Result<()> {
     Ok(())
 }
 
-// The first time we unblock SIGTIMEOUT should cause approprate initialization:
+// The first time we unblock SIGTIMEOUT should cause appropriate initialization:
 static SETUP_TIMEOUT_HANDLER: std::sync::Once = std::sync::Once::new();
 
 /// Setup our timeout-signal workflow. This establishes the signal handler for
diff --git a/proxmox-time/src/wasm.rs b/proxmox-time/src/wasm.rs
index 4f268dce..c85f2a10 100644
--- a/proxmox-time/src/wasm.rs
+++ b/proxmox-time/src/wasm.rs
@@ -58,7 +58,7 @@ pub fn epoch_to_rfc3339(epoch: i64) -> Result<String, Error> {
 
 /// Parse RFC3339 into Unix epoch
 pub fn parse_rfc3339(input_str: &str) -> Result<i64, Error> {
-    // TOTO: This should parse olny RFC3339, but currently also parse
+    // TOTO: This should parse only RFC3339, but currently also parse
     // other formats
     let time_milli = js_sys::Date::parse(input_str);
     if time_milli.is_nan() {
diff --git a/proxmox-uuid/src/lib.rs b/proxmox-uuid/src/lib.rs
index b8fd733b..cd55a540 100644
--- a/proxmox-uuid/src/lib.rs
+++ b/proxmox-uuid/src/lib.rs
@@ -95,7 +95,7 @@ impl Uuid {
         use std::alloc::{alloc, Layout};
         let uuid: *mut [u8; 16] = unsafe { alloc(Layout::new::<[u8; 16]>()) as *mut [u8; 16] };
         if src.len() == 36 {
-            // Unfortunately the manpage of `uuid_parse(3)` states that it technically requiers a
+            // Unfortunately the manpage of `uuid_parse(3)` states that it technically requires a
             // terminating null byte at the end, which we don't have, so do this manually:
             let uuid: &mut [u8] = unsafe { &mut (*uuid)[..] };
             let src = src.as_bytes();
diff --git a/proxmox-uuid/src/wasm.rs b/proxmox-uuid/src/wasm.rs
index 6115d703..23a84bbb 100644
--- a/proxmox-uuid/src/wasm.rs
+++ b/proxmox-uuid/src/wasm.rs
@@ -3,7 +3,7 @@ use std::fmt;
 use crate::Uuid;
 
 pub fn uuid_generate(out: *mut [u8; 16]) {
-    // TODO: implement soemthing better than this
+    // TODO: implement something better than this
 
     let time = js_sys::Date::now() as u64;
     let random1 = (js_sys::Math::random() * f64::MAX) as u64;
-- 
2.39.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  reply	other threads:[~2024-07-18 13:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 13:05 [pbs-devel] [PATCH proxmox 1/4] fix typos in rust api documentation Maximiliano Sandoval
2024-07-18 13:05 ` Maximiliano Sandoval [this message]
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 3/4] fix typos in variable and function names Maximiliano Sandoval
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 4/4] fix typos in strings Maximiliano Sandoval
2024-07-22  6:50 ` [pbs-devel] applied-series: [PATCH proxmox 1/4] fix typos in rust api documentation Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240718130534.370768-2-m.sandoval@proxmox.com \
    --to=m.sandoval@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal