* [pbs-devel] [PATCH proxmox 1/4] fix typos in rust api documentation
@ 2024-07-18 13:05 Maximiliano Sandoval
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 2/4] fix typos in code documentation Maximiliano Sandoval
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-07-18 13:05 UTC (permalink / raw)
To: pbs-devel
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
proxmox-access-control/src/cached_user_info.rs | 2 +-
proxmox-acme/src/account.rs | 4 ++--
proxmox-acme/src/authorization.rs | 2 +-
proxmox-acme/src/error.rs | 2 +-
proxmox-acme/src/types.rs | 2 +-
proxmox-api-macro/src/api/mod.rs | 2 +-
proxmox-api-macro/src/util.rs | 2 +-
proxmox-apt-api-types/src/lib.rs | 4 ++--
proxmox-apt/src/deb822/release_file.rs | 2 +-
proxmox-auth-api/src/auth_key.rs | 2 +-
proxmox-client/src/lib.rs | 6 +++---
proxmox-http/src/client/tls.rs | 2 +-
proxmox-http/src/websocket/mod.rs | 2 +-
proxmox-io/src/read.rs | 8 ++++----
proxmox-io/src/write.rs | 4 ++--
proxmox-ldap/src/lib.rs | 4 ++--
proxmox-login/src/ticket.rs | 4 ++--
proxmox-router/src/cli/command.rs | 4 ++--
proxmox-router/src/cli/environment.rs | 2 +-
proxmox-router/src/cli/text_table.rs | 6 +++---
proxmox-router/src/format.rs | 4 ++--
proxmox-schema/src/format.rs | 6 +++---
proxmox-schema/src/schema.rs | 4 ++--
proxmox-section-config/src/lib.rs | 2 +-
proxmox-sys/src/crypt.rs | 4 ++--
proxmox-sys/src/linux/pid.rs | 2 +-
proxmox-sys/src/linux/procfs/mod.rs | 2 +-
proxmox-sys/src/linux/timer.rs | 2 +-
proxmox-time/src/posix.rs | 2 +-
proxmox-uuid/src/lib.rs | 2 +-
30 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/proxmox-access-control/src/cached_user_info.rs b/proxmox-access-control/src/cached_user_info.rs
index 00f22a6b..4d011f00 100644
--- a/proxmox-access-control/src/cached_user_info.rs
+++ b/proxmox-access-control/src/cached_user_info.rs
@@ -180,7 +180,7 @@ impl CachedUserInfo {
(privs, propagated_privs)
}
- /// Checks whether the `auth_id` has any of the privilegs `privs` on any object below `path`.
+ /// Checks whether the `auth_id` has any of the privileges `privs` on any object below `path`.
pub fn any_privs_below(
&self,
auth_id: &Authid,
diff --git a/proxmox-acme/src/account.rs b/proxmox-acme/src/account.rs
index 112a2ad9..0f023224 100644
--- a/proxmox-acme/src/account.rs
+++ b/proxmox-acme/src/account.rs
@@ -284,7 +284,7 @@ impl CertificateRevocation<'_> {
/// creation request can be created via the [`request`](AccountCreator::request()) method, giving
/// it a nonce and a directory. This can be repeated, if necessary, like when the nonce fails.
///
-/// When the server sends a succesful response, it should be passed to the
+/// When the server sends a successful response, it should be passed to the
/// [`response`](AccountCreator::response()) method to finish the creation of an [`Account`] which
/// can then be persisted.
#[derive(Default)]
@@ -297,7 +297,7 @@ pub struct AccountCreator {
}
impl AccountCreator {
- /// Replace the contact infor with the provided ACME compatible data.
+ /// Replace the contact info with the provided ACME compatible data.
pub fn set_contacts(mut self, contact: Vec<String>) -> Self {
self.contact = contact;
self
diff --git a/proxmox-acme/src/authorization.rs b/proxmox-acme/src/authorization.rs
index fee3614d..28bc1b4b 100644
--- a/proxmox-acme/src/authorization.rs
+++ b/proxmox-acme/src/authorization.rs
@@ -76,7 +76,7 @@ pub enum ChallengeStatus {
/// The challenge is pending and has not been validated yet.
Pending,
- /// The valiation is in progress.
+ /// The validation is in progress.
Processing,
/// The challenge was successfully validated.
diff --git a/proxmox-acme/src/error.rs b/proxmox-acme/src/error.rs
index 59da3ea1..4253f8e2 100644
--- a/proxmox-acme/src/error.rs
+++ b/proxmox-acme/src/error.rs
@@ -22,7 +22,7 @@ pub enum Error {
/// the user has to agree to the new terms.
UserActionRequired(String),
- /// Other error repsonses from the Acme API not handled specially.
+ /// Other error responses from the Acme API not handled specially.
Api(crate::request::ErrorResponse),
/// The Acme API behaved unexpectedly.
diff --git a/proxmox-acme/src/types.rs b/proxmox-acme/src/types.rs
index 9a1650ff..e5a6b34d 100644
--- a/proxmox-acme/src/types.rs
+++ b/proxmox-acme/src/types.rs
@@ -95,7 +95,7 @@ pub struct AccountData {
#[serde(skip_serializing_if = "Option::is_none")]
pub orders: Option<String>,
- /// The acccount's contact info.
+ /// The account's contact info.
///
/// This usually contains a `"mailto:<email address>"` entry but may also contain some other
/// data if the server accepts it.
diff --git a/proxmox-api-macro/src/api/mod.rs b/proxmox-api-macro/src/api/mod.rs
index 01bd5e20..abd1b036 100644
--- a/proxmox-api-macro/src/api/mod.rs
+++ b/proxmox-api-macro/src/api/mod.rs
@@ -526,7 +526,7 @@ impl SchemaObject {
}
}
- /// Check whether ther are any kind of fields defined in the struct, regardless of whether
+ /// Check whether there are any kind of fields defined in the struct, regardless of whether
/// they're flattened or not.
#[inline]
pub fn is_empty(&self) -> bool {
diff --git a/proxmox-api-macro/src/util.rs b/proxmox-api-macro/src/util.rs
index 5f486e4b..adacd225 100644
--- a/proxmox-api-macro/src/util.rs
+++ b/proxmox-api-macro/src/util.rs
@@ -137,7 +137,7 @@ impl Parse for FieldName {
}
/// Most of our schema definition consists of a json-like notation.
-/// For parsing we mostly just need to destinguish between objects and non-objects.
+/// For parsing we mostly just need to distinguish between objects and non-objects.
/// For specific expression types we match on the contained expression later on.
// FIXME: Expr(Box<syn::Expr>)
#[allow(clippy::large_enum_variant)]
diff --git a/proxmox-apt-api-types/src/lib.rs b/proxmox-apt-api-types/src/lib.rs
index 6025722f..ce6f5d78 100644
--- a/proxmox-apt-api-types/src/lib.rs
+++ b/proxmox-apt-api-types/src/lib.rs
@@ -50,7 +50,7 @@ serde_plain::derive_fromstr_from_deserialize!(APTRepositoryPackageType);
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "PascalCase")] // for consistency
/// Additional options for an APT repository.
-/// Used for both single- and mutli-value options.
+/// Used for both single- and multi-value options.
pub struct APTRepositoryOption {
/// Option key.
pub key: String,
@@ -223,7 +223,7 @@ pub struct APTRepositoryInfo {
#[serde(default, skip_serializing_if = "String::is_empty")]
pub path: String,
- /// Index of the associated respository within the file (starting from 0).
+ /// Index of the associated repository within the file (starting from 0).
pub index: usize,
/// The property from which the info originates (e.g. "Suites")
diff --git a/proxmox-apt/src/deb822/release_file.rs b/proxmox-apt/src/deb822/release_file.rs
index 3973dad0..dbf1a367 100644
--- a/proxmox-apt/src/deb822/release_file.rs
+++ b/proxmox-apt/src/deb822/release_file.rs
@@ -46,7 +46,7 @@ pub type Architecture = String;
pub type Component = String;
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
-/// Type of file reference extraced from path.
+/// Type of file reference extracted from path.
///
/// `Packages` and `Sources` will contain further reference to binary or source package files.
/// These are handled in `PackagesFile` and `SourcesFile` respectively.
diff --git a/proxmox-auth-api/src/auth_key.rs b/proxmox-auth-api/src/auth_key.rs
index 3ea4bbd3..9873d935 100644
--- a/proxmox-auth-api/src/auth_key.rs
+++ b/proxmox-auth-api/src/auth_key.rs
@@ -229,7 +229,7 @@ enum VerificationKey {
/// A key ring for authentication.
///
-/// This can hold one active signing key for new tickets (either an HMAC secret or an assymmetric
+/// This can hold one active signing key for new tickets (either an HMAC secret or an asymmetric
/// key), and optionally multiple public keys and HMAC secrets for verifying them in order to
/// support key rollover.
pub struct Keyring {
diff --git a/proxmox-client/src/lib.rs b/proxmox-client/src/lib.rs
index eab6cf23..dd57290a 100644
--- a/proxmox-client/src/lib.rs
+++ b/proxmox-client/src/lib.rs
@@ -36,7 +36,7 @@ pub trait HttpApiClient {
/// `POST` request with a path and query component (no hostname), and a serializable body.
///
- /// The body should be serialized to json and sent with `Content-type: applicaion/json`.
+ /// The body should be serialized to json and sent with `Content-type: application/json`.
///
/// For this request, authentication headers should be set!
fn post<'a, T>(&'a self, path_and_query: &'a str, params: &T) -> Self::ResponseFuture<'a>
@@ -50,7 +50,7 @@ pub trait HttpApiClient {
/// `PUT` request with a path and query component (no hostname), and a serializable body.
///
- /// The body should be serialized to json and sent with `Content-type: applicaion/json`.
+ /// The body should be serialized to json and sent with `Content-type: application/json`.
///
/// For this request, authentication headers should be set!
fn put<'a, T>(&'a self, path_and_query: &'a str, params: &T) -> Self::ResponseFuture<'a>
@@ -76,7 +76,7 @@ pub struct HttpApiResponse {
}
impl HttpApiResponse {
- /// Expect a JSON response as returend by the `extjs` formatter.
+ /// Expect a JSON response as returned by the `extjs` formatter.
pub fn expect_json<T>(self) -> Result<ApiResponseData<T>, Error>
where
T: for<'de> Deserialize<'de>,
diff --git a/proxmox-http/src/client/tls.rs b/proxmox-http/src/client/tls.rs
index f785108a..81aff783 100644
--- a/proxmox-http/src/client/tls.rs
+++ b/proxmox-http/src/client/tls.rs
@@ -10,7 +10,7 @@ use tokio_openssl::SslStream;
/// Asynchronous stream, possibly encrypted and proxied
///
-/// Usefule for HTTP client implementations using hyper.
+/// Useful for HTTP client implementations using hyper.
pub enum MaybeTlsStream<S> {
Normal(S),
Proxied(S),
diff --git a/proxmox-http/src/websocket/mod.rs b/proxmox-http/src/websocket/mod.rs
index 6d3faea6..a39ff03a 100644
--- a/proxmox-http/src/websocket/mod.rs
+++ b/proxmox-http/src/websocket/mod.rs
@@ -228,7 +228,7 @@ pub fn create_frame(
///
/// Send websocket frames to anything accepting AsyncWrite.
///
-/// Note: Every write to it gets encoded as a seperate websocket frame, without any fragmentation
+/// Note: Every write to it gets encoded as a separate websocket frame, without any fragmentation
/// being enforced.
///
/// Example usage:
diff --git a/proxmox-io/src/read.rs b/proxmox-io/src/read.rs
index 4ad8a65d..67a608dc 100644
--- a/proxmox-io/src/read.rs
+++ b/proxmox-io/src/read.rs
@@ -10,7 +10,7 @@ use crate::vec::{self, ByteVecExt};
/// Adds some additional related functionality for types implementing [`Read`](std::io::Read).
///
/// Particularly for reading into a newly allocated buffer, appending to a `Vec<u8>` or reading
-/// values of a specific endianess (types implementing [`Endian`]).
+/// values of a specific endianness (types implementing [`Endian`]).
///
/// Examples:
/// ```no_run
@@ -29,7 +29,7 @@ use crate::vec::{self, ByteVecExt};
/// # }
/// ```
///
-/// Or for reading values of a defined representation and endianess:
+/// Or for reading values of a defined representation and endianness:
///
/// ```no_run
/// # use endian_trait::Endian;
@@ -77,7 +77,7 @@ pub trait ReadExt {
/// Append an exact amount of data to a vector, growing it as necessary.
fn append_exact_to_vec(&mut self, out: &mut Vec<u8>, size: usize) -> io::Result<()>;
- /// Read a value with host endianess.
+ /// Read a value with host endianness.
///
/// This is limited to types implementing the [`Endian`] trait under the assumption that
/// this is only done for types which are supposed to be read/writable directly.
@@ -187,7 +187,7 @@ pub trait ReadExt {
/// [`Endian`]: https://docs.rs/endian_trait/0.6/endian_trait/trait.Endian.html
unsafe fn read_be_value<T: Endian>(&mut self) -> io::Result<T>;
- /// Read a boxed value with host endianess.
+ /// Read a boxed value with host endianness.
///
/// This is currently not limited to types implementing the [`Endian`] trait as in our use
/// cases we use this for types which are too big to want to always perform endian swaps
diff --git a/proxmox-io/src/write.rs b/proxmox-io/src/write.rs
index f519c057..d0d2eca1 100644
--- a/proxmox-io/src/write.rs
+++ b/proxmox-io/src/write.rs
@@ -6,7 +6,7 @@ use endian_trait::Endian;
/// Adds some additional related functionality for types implementing [`Write`](std::io::Write).
///
-/// Particularly for writing values of a specific endianess (types implementing [`Endian`]).
+/// Particularly for writing values of a specific endianness (types implementing [`Endian`]).
///
/// Examples:
/// ```no_run
@@ -35,7 +35,7 @@ use endian_trait::Endian;
///
/// [`Endian`]: https://docs.rs/endian_trait/0.6/endian_trait/trait.Endian.html
pub trait WriteExt {
- /// Write a value with host endianess.
+ /// Write a value with host endianness.
///
/// This is limited to types implementing the [`Endian`] trait under the assumption that this
/// is only done for types which are supposed to be read/writable directly.
diff --git a/proxmox-ldap/src/lib.rs b/proxmox-ldap/src/lib.rs
index ce37c778..014bdcc1 100644
--- a/proxmox-ldap/src/lib.rs
+++ b/proxmox-ldap/src/lib.rs
@@ -58,7 +58,7 @@ pub struct Config {
pub struct SearchParameters {
/// Attributes that should be retrieved
pub attributes: Vec<String>,
- /// `objectclass`es of intereset
+ /// `objectclass`es of interest
pub user_classes: Vec<String>,
/// Custom user filter
pub user_filter: Option<String>,
@@ -217,7 +217,7 @@ impl Connection {
.ok_or_else(|| format_err!("failed to retrieve root DSE attribute '{attr}'"))
}
- /// Retrive port from LDAP configuration, otherwise use the correct default
+ /// Retrieve port from LDAP configuration, otherwise use the correct default
fn port_from_config(&self) -> u16 {
self.config.port.unwrap_or_else(|| {
if self.config.tls_mode == ConnectionMode::Ldaps {
diff --git a/proxmox-login/src/ticket.rs b/proxmox-login/src/ticket.rs
index 9543b70e..40decf99 100644
--- a/proxmox-login/src/ticket.rs
+++ b/proxmox-login/src/ticket.rs
@@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
use crate::error::TicketError;
use crate::tfa::TfaChallenge;
-/// The repsonse to a ticket call can either be a complete ticket, or a TFA challenge.
+/// The response to a ticket call can either be a complete ticket, or a TFA challenge.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub(crate) enum TicketResponse {
Full(Ticket),
@@ -62,7 +62,7 @@ impl Ticket {
&self.data[start..(start + len)]
}
- /// Thet ticket's timestamp as a UNIX epoch.
+ /// The ticket's timestamp as a UNIX epoch.
pub fn timestamp(&self) -> i64 {
self.timestamp
}
diff --git a/proxmox-router/src/cli/command.rs b/proxmox-router/src/cli/command.rs
index b658e055..2b6c39ed 100644
--- a/proxmox-router/src/cli/command.rs
+++ b/proxmox-router/src/cli/command.rs
@@ -393,7 +393,7 @@ pub async fn run_async_cli_command<C: Into<CommandLineInterface>>(def: C, rpcenv
/// Helper to get arguments and invoke the command.
///
-/// This is the synchrounous version of run_async_cli_command. You can
+/// This is the synchronous version of run_async_cli_command. You can
/// pass an optional ``run`` function to execute async commands (else
/// async commands simply fail).
pub fn run_cli_command<C: Into<CommandLineInterface>>(
@@ -437,7 +437,7 @@ where
/// Helper to get arguments and invoke the command.
///
-/// This is the synchrounous version of run_async_cli_command. You can
+/// This is the synchronous version of run_async_cli_command. You can
/// pass an optional ``run`` function to execute async commands (else
/// async commands simply fail).
pub fn run_cli_command_with_args<A, C>(
diff --git a/proxmox-router/src/cli/environment.rs b/proxmox-router/src/cli/environment.rs
index 860a4ea2..3d3dec19 100644
--- a/proxmox-router/src/cli/environment.rs
+++ b/proxmox-router/src/cli/environment.rs
@@ -7,7 +7,7 @@ use proxmox_schema::ApiType;
use crate::{RpcEnvironment, RpcEnvironmentType};
-/// `RpcEnvironmet` implementation for command line tools
+/// `RpcEnvironment` implementation for command line tools
#[derive(Default)]
pub struct CliEnvironment {
result_attributes: Value,
diff --git a/proxmox-router/src/cli/text_table.rs b/proxmox-router/src/cli/text_table.rs
index 1b47ccc2..34173b4d 100644
--- a/proxmox-router/src/cli/text_table.rs
+++ b/proxmox-router/src/cli/text_table.rs
@@ -6,11 +6,11 @@ use unicode_width::UnicodeWidthStr;
use proxmox_schema::{ObjectSchemaType, OneOfSchema, Schema, SchemaPropertyEntry};
-/// allows to configure the default output fromat using environment vars
+/// allows to configure the default output format using environment vars
pub const ENV_VAR_PROXMOX_OUTPUT_FORMAT: &str = "PROXMOX_OUTPUT_FORMAT";
-/// if set, supress borders (and headers) when printing tables
+/// if set, suppress borders (and headers) when printing tables
pub const ENV_VAR_PROXMOX_OUTPUT_NO_BORDER: &str = "PROXMOX_OUTPUT_NO_BORDER";
-/// if set, supress headers when printing tables
+/// if set, suppress headers when printing tables
pub const ENV_VAR_PROXMOX_OUTPUT_NO_HEADER: &str = "PROXMOX_OUTPUT_NO_HEADER";
/// Helper to get output format from parameters or environment
diff --git a/proxmox-router/src/format.rs b/proxmox-router/src/format.rs
index a265a2c8..67568af0 100644
--- a/proxmox-router/src/format.rs
+++ b/proxmox-router/src/format.rs
@@ -1,4 +1,4 @@
-//! Module to generate and format API Documenation
+//! Module to generate and format API Documentation
use std::io::Write;
@@ -41,7 +41,7 @@ fn dump_method_definition(method: &str, path: &str, def: Option<&ApiMethod>) ->
}
}
-/// Generate ReST Documentaion for a complete API defined by a ``Router``.
+/// Generate ReST Documentation for a complete API defined by a ``Router``.
pub fn dump_api(
output: &mut dyn Write,
router: &crate::Router,
diff --git a/proxmox-schema/src/format.rs b/proxmox-schema/src/format.rs
index fd9df988..4a8b559a 100644
--- a/proxmox-schema/src/format.rs
+++ b/proxmox-schema/src/format.rs
@@ -1,4 +1,4 @@
-//! Module to generate and format API Documenation
+//! Module to generate and format API Documentation
use anyhow::{bail, Error};
@@ -134,7 +134,7 @@ fn get_simple_type_text(schema: &Schema, list_enums: bool) -> String {
}
}
-/// Generate ReST Documentaion for object properties
+/// Generate ReST Documentation for object properties
pub fn dump_properties(
param: &dyn ObjectSchemaType,
indent: &str,
@@ -424,7 +424,7 @@ fn get_object_type_text(object_schema: &ObjectSchema) -> String {
type_text
}
-/// Generate ReST Documentaion for enumeration.
+/// Generate ReST Documentation for enumeration.
pub fn dump_enum_properties(schema: &Schema) -> Result<String, Error> {
let mut res = String::new();
diff --git a/proxmox-schema/src/schema.rs b/proxmox-schema/src/schema.rs
index b71720bb..eec6d81a 100644
--- a/proxmox-schema/src/schema.rs
+++ b/proxmox-schema/src/schema.rs
@@ -1,6 +1,6 @@
//! Data types to decscribe data types.
//!
-//! This is loosly based on JSON Schema, but uses static rust data types. This way we can build
+//! This is loosely based on JSON Schema, but uses static rust data types. This way we can build
//! completely static API definitions that can be included within the programs read-only text
//! segment.
@@ -1403,7 +1403,7 @@ impl EnumEntry {
/// Use a schema to describe complex types encoded as string.
///
/// Arrays are parsed as comma separated lists, i.e: `"1,2,3"`. The
-/// list may be sparated by comma, semicolon or whitespace.
+/// list may be separated by comma, semicolon or whitespace.
///
/// Objects are parsed as comma (or semicolon) separated `key=value` pairs, i.e:
/// `"prop1=2,prop2=test"`. Any whitespace is trimmed from key and value.
diff --git a/proxmox-section-config/src/lib.rs b/proxmox-section-config/src/lib.rs
index cfa79ad4..3d383880 100644
--- a/proxmox-section-config/src/lib.rs
+++ b/proxmox-section-config/src/lib.rs
@@ -1221,7 +1221,7 @@ sync: fail
assert!(config.parse(filename, raw).is_err());
}
-/// Generate ReST Documentaion for ``SectionConfig``
+/// Generate ReST Documentation for ``SectionConfig``
pub fn dump_section_config(config: &SectionConfig) -> String {
let mut res = String::new();
diff --git a/proxmox-sys/src/crypt.rs b/proxmox-sys/src/crypt.rs
index 3313f668..8bc0d7e3 100644
--- a/proxmox-sys/src/crypt.rs
+++ b/proxmox-sys/src/crypt.rs
@@ -35,7 +35,7 @@ struct crypt_data {
internal: [libc::c_char; CRYPT_DATA_INTERNAL_SIZE],
}
-/// Encrypt a pasword - see man crypt(3)
+/// Encrypt a password - see man crypt(3)
pub fn crypt(password: &[u8], salt: &[u8]) -> Result<String, Error> {
#[link(name = "crypt")]
extern "C" {
@@ -142,7 +142,7 @@ pub fn crypt_gensalt(prefix: &str, count: u64, rbytes: &[u8]) -> Result<String,
Ok(res.to_str()?.to_string())
}
-/// Encrypt a pasword using sha256 hashing method
+/// Encrypt a password using sha256 hashing method
pub fn encrypt_pw(password: &str) -> Result<String, Error> {
// 8*32 = 256 bits security (128+ recommended, see `man crypt(5)`)
let salt = crate::linux::random_data(32)?;
diff --git a/proxmox-sys/src/linux/pid.rs b/proxmox-sys/src/linux/pid.rs
index 488b3f8d..4407c82f 100644
--- a/proxmox-sys/src/linux/pid.rs
+++ b/proxmox-sys/src/linux/pid.rs
@@ -38,7 +38,7 @@ unsafe fn pidfd_send_signal(
libc::syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags)
}
-/// File descriptor refernce to a process.
+/// File descriptor reference to a process.
pub struct PidFd {
fd: OwnedFd,
pid: Pid,
diff --git a/proxmox-sys/src/linux/procfs/mod.rs b/proxmox-sys/src/linux/procfs/mod.rs
index 06ad6206..6c436c74 100644
--- a/proxmox-sys/src/linux/procfs/mod.rs
+++ b/proxmox-sys/src/linux/procfs/mod.rs
@@ -753,7 +753,7 @@ pub fn read_loadavg() -> Result<Loadavg, Error> {
Loadavg::read()
}
-/// Load avarage: floating point values for 1, 5 and 15 minutes of runtime.
+/// Load average: floating point values for 1, 5 and 15 minutes of runtime.
#[derive(Clone, Debug)]
pub struct Loadavg(pub f64, pub f64, pub f64);
diff --git a/proxmox-sys/src/linux/timer.rs b/proxmox-sys/src/linux/timer.rs
index d18118ac..1317caaf 100644
--- a/proxmox-sys/src/linux/timer.rs
+++ b/proxmox-sys/src/linux/timer.rs
@@ -314,7 +314,7 @@ impl TimeoutBlockGuard {
}
/// Unblock the timeout signal for the current thread. By default we block the
-/// signal this behavior should be restored when done using timeouts, therefor this
+/// signal this behavior should be restored when done using timeouts, therefore this
/// returns a guard:
#[inline(always)]
pub fn unblock_timeout_signal() -> TimeoutBlockGuard {
diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs
index 73a5368b..7db69928 100644
--- a/proxmox-time/src/posix.rs
+++ b/proxmox-time/src/posix.rs
@@ -94,7 +94,7 @@ pub fn epoch_i64() -> i64 {
/// Returns Unix Epoch (now) as f64 with subseconds resolution
///
-/// Note: This can be inacurrate for values greater the 2^53. But this
+/// Note: This can be inaccurate for values greater the 2^53. But this
/// should never happen.
pub fn epoch_f64() -> f64 {
use std::time::{SystemTime, UNIX_EPOCH};
diff --git a/proxmox-uuid/src/lib.rs b/proxmox-uuid/src/lib.rs
index 4b424c2d..b8fd733b 100644
--- a/proxmox-uuid/src/lib.rs
+++ b/proxmox-uuid/src/lib.rs
@@ -44,7 +44,7 @@ fn hex_digit(b: u8) -> Result<u8, UuidError> {
///
/// let uuid = Uuid::generate();
/// println!("Generated uuid: {}", uuid);
-/// // prints somethign like:
+/// // prints something like:
/// // Generated uuid: 65b85639-78d7-4330-85c6-39502b2f9b01
///
/// let bytes: &[u8] = uuid.as_ref();
--
2.39.2
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH proxmox 2/4] fix typos in code documentation
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
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 3/4] fix typos in variable and function names Maximiliano Sandoval
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-07-18 13:05 UTC (permalink / raw)
To: pbs-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH proxmox 3/4] fix typos in variable and function names
2024-07-18 13:05 [pbs-devel] [PATCH proxmox 1/4] fix typos in rust api documentation Maximiliano Sandoval
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 2/4] fix typos in code documentation Maximiliano Sandoval
@ 2024-07-18 13:05 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-07-18 13:05 UTC (permalink / raw)
To: pbs-devel
Signed-off-by: Maximiliano Sandoval <m.sandoval@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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH proxmox 4/4] fix typos in strings
2024-07-18 13:05 [pbs-devel] [PATCH proxmox 1/4] fix typos in rust api documentation Maximiliano Sandoval
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 2/4] fix typos in code documentation Maximiliano Sandoval
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 ` Maximiliano Sandoval
2024-07-22 6:50 ` [pbs-devel] applied-series: [PATCH proxmox 1/4] fix typos in rust api documentation Thomas Lamprecht
3 siblings, 0 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-07-18 13:05 UTC (permalink / raw)
To: pbs-devel
Signed-off-by: Maximiliano Sandoval <m.sandoval@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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] applied-series: [PATCH proxmox 1/4] fix typos in rust api documentation
2024-07-18 13:05 [pbs-devel] [PATCH proxmox 1/4] fix typos in rust api documentation Maximiliano Sandoval
` (2 preceding siblings ...)
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 4/4] fix typos in strings Maximiliano Sandoval
@ 2024-07-22 6:50 ` Thomas Lamprecht
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2024-07-22 6:50 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Maximiliano Sandoval
Am 18/07/2024 um 15:05 schrieb Maximiliano Sandoval:
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> proxmox-access-control/src/cached_user_info.rs | 2 +-
> proxmox-acme/src/account.rs | 4 ++--
> proxmox-acme/src/authorization.rs | 2 +-
> proxmox-acme/src/error.rs | 2 +-
> proxmox-acme/src/types.rs | 2 +-
> proxmox-api-macro/src/api/mod.rs | 2 +-
> proxmox-api-macro/src/util.rs | 2 +-
> proxmox-apt-api-types/src/lib.rs | 4 ++--
> proxmox-apt/src/deb822/release_file.rs | 2 +-
> proxmox-auth-api/src/auth_key.rs | 2 +-
> proxmox-client/src/lib.rs | 6 +++---
> proxmox-http/src/client/tls.rs | 2 +-
> proxmox-http/src/websocket/mod.rs | 2 +-
> proxmox-io/src/read.rs | 8 ++++----
> proxmox-io/src/write.rs | 4 ++--
> proxmox-ldap/src/lib.rs | 4 ++--
> proxmox-login/src/ticket.rs | 4 ++--
> proxmox-router/src/cli/command.rs | 4 ++--
> proxmox-router/src/cli/environment.rs | 2 +-
> proxmox-router/src/cli/text_table.rs | 6 +++---
> proxmox-router/src/format.rs | 4 ++--
> proxmox-schema/src/format.rs | 6 +++---
> proxmox-schema/src/schema.rs | 4 ++--
> proxmox-section-config/src/lib.rs | 2 +-
> proxmox-sys/src/crypt.rs | 4 ++--
> proxmox-sys/src/linux/pid.rs | 2 +-
> proxmox-sys/src/linux/procfs/mod.rs | 2 +-
> proxmox-sys/src/linux/timer.rs | 2 +-
> proxmox-time/src/posix.rs | 2 +-
> proxmox-uuid/src/lib.rs | 2 +-
> 30 files changed, 48 insertions(+), 48 deletions(-)
>
>
applied all four patches, thanks!
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-22 6:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-18 13:05 [pbs-devel] [PATCH proxmox 1/4] fix typos in rust api documentation Maximiliano Sandoval
2024-07-18 13:05 ` [pbs-devel] [PATCH proxmox 2/4] fix typos in code documentation Maximiliano Sandoval
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
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