From f22e9975872e1d23a2b5b7b036060a6f387a19ea Mon Sep 17 00:00:00 2001 From: Jamil Lambert Date: Tue, 22 Apr 2025 10:43:13 +0100 Subject: [PATCH] Use parameters instead of arguments in rustdocs The rustdocs use both `# Parameters` and `# Arguments` to mean the same thing. Change all of them to `# Parameters` to be consistent. --- chacha20_poly1305/src/lib.rs | 4 ++-- hashes/src/internal_macros.rs | 5 +++-- units/src/parse.rs | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/chacha20_poly1305/src/lib.rs b/chacha20_poly1305/src/lib.rs index 0deea843d..7777e0935 100644 --- a/chacha20_poly1305/src/lib.rs +++ b/chacha20_poly1305/src/lib.rs @@ -75,7 +75,7 @@ impl ChaCha20Poly1305 { /// Encrypt content in place and return the Poly1305 16-byte authentication tag. /// - /// # Arguments + /// # Parameters /// /// - `content` - Plaintext to be encrypted in place. /// - `aad` - Optional metadata covered by the authentication tag. @@ -110,7 +110,7 @@ impl ChaCha20Poly1305 { /// Decrypt the ciphertext in place if authentication tag is correct. /// - /// # Arguments + /// # Parameters /// /// - `content` - Ciphertext to be decrypted in place. /// - `tag` - 16-byte authentication tag. diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index 20d029e33..d325d13b7 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -5,7 +5,8 @@ /// Adds trait impls to the type called `Hash` in the current scope. /// /// Implements various conversion traits as well as the [`crate::Hash`] trait. -/// Arguments: +/// +/// # Parameters /// /// * `$bits` - number of bits this hash type has /// * `$reverse` - `bool` - `true` if the hash type should be displayed backwards, `false` @@ -55,7 +56,7 @@ pub(crate) use hash_trait_impls; /// The created type has a single field and will have all standard derives as well as an /// implementation of [`crate::Hash`]. /// -/// Arguments: +/// # Parameters /// /// * `$bits` - the number of bits of the hash type /// * `$reverse` - `true` if the hash should be displayed backwards, `false` otherwise diff --git a/units/src/parse.rs b/units/src/parse.rs index 9c0a6ca6b..502a4a1e7 100644 --- a/units/src/parse.rs +++ b/units/src/parse.rs @@ -139,7 +139,7 @@ fn int + Into>(s: S) -> Result>` /// * `TryFrom` /// -/// # Arguments +/// # Parameters /// /// * `to` - the type converted to e.g., `impl From<&str> for $to`. /// * `err` - the error type returned by `$inner_fn` (implies returned by `FromStr` and `TryFrom`). @@ -204,7 +204,7 @@ macro_rules! impl_parse_str_from_int_infallible { /// * `TryFrom>` /// * `TryFrom` /// -/// # Arguments +/// # Parameters /// /// * `to` - the type converted to e.g., `impl From<&str> for $to`. /// * `err` - the error type returned by `$inner_fn` (implies returned by `FromStr` and `TryFrom`).