Merge rust-bitcoin/rust-bitcoin#4288: chore: fix some typos in comment
2867a7074f
chore: fix some typos in comment (todaymoon)
Pull request description:
I fix some typos in the comments to improve readability.
ACKs for top commit:
apoelstra:
ACK 2867a7074ffef9c77d0a660d788b30d9afaf7494; successfully ran local tests
Tree-SHA512: 64a418b36443b0c1fd653cfc66fb35c13fafd0f3dff388df365ded35a83b759c5a6a3565add626f7d9813f3985019df92635fb18acd1893e453e02687717de18
This commit is contained in:
commit
b0abb92fa0
|
@ -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;
|
||||
|
|
|
@ -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)?))
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue