From 2867a7074ffef9c77d0a660d788b30d9afaf7494 Mon Sep 17 00:00:00 2001 From: todaymoon Date: Wed, 26 Mar 2025 21:03:03 +0800 Subject: [PATCH] chore: fix some typos in comment Signed-off-by: todaymoon --- hashes/src/sha256/crypto.rs | 6 +++--- internals/src/macros.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hashes/src/sha256/crypto.rs b/hashes/src/sha256/crypto.rs index eea9ff7a0..ef4b0f25c 100644 --- a/hashes/src/sha256/crypto.rs +++ b/hashes/src/sha256/crypto.rs @@ -80,7 +80,7 @@ mod fast_hash { } impl Midstate { - #[allow(clippy::identity_op)] // more readble + #[allow(clippy::identity_op)] // more readable const fn read_u32(bytes: &[u8], index: usize) -> u32 { ((bytes[index + 0] as u32) << 24) | ((bytes[index + 1] as u32) << 16) @@ -130,7 +130,7 @@ impl Midstate { if (bytes.len() % 64 <= 64 - 9) || (chunk + 2 == num_chunks) { buf[i] = 0x80; } - #[allow(clippy::identity_op)] // more readble + #[allow(clippy::identity_op)] // more readable #[allow(clippy::erasing_op)] if chunk + 1 == num_chunks { let bit_len = bytes.len() as u64 * 8; @@ -235,7 +235,7 @@ impl Midstate { } let mut output = [0u8; 32]; let mut i = 0; - #[allow(clippy::identity_op)] // more readble + #[allow(clippy::identity_op)] // more readable while i < 8 { output[i * 4 + 0] = (state[i + 0] >> 24) as u8; output[i * 4 + 1] = (state[i + 0] >> 16) as u8; diff --git a/internals/src/macros.rs b/internals/src/macros.rs index 69725e232..b4c95f275 100644 --- a/internals/src/macros.rs +++ b/internals/src/macros.rs @@ -8,7 +8,7 @@ macro_rules! const_assert { ($x:expr $(; $message:expr)?) => { const _: () = { if !$x { - // We can't use formatting in const, only concating literals. + // We can't use formatting in const, only concatenating literals. panic!(concat!("assertion ", stringify!($x), " failed" $(, ": ", $message)?)) } };