Pin Clippy version and fix lints (#59)

This commit is contained in:
Artyom Pavlov 2023-08-07 17:36:22 +03:00 committed by GitHub
parent aa5da2013e
commit 690624016e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -17,7 +17,7 @@ jobs:
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: 1.71.0
components: clippy
- run: cargo clippy --all -- -D warnings

View File

@ -183,10 +183,7 @@ impl State {
/// Convert state to bytes.
pub fn as_bytes(&self) -> [u8; 40] {
let mut bytes = [0u8; size_of::<u64>() * 5];
for (dst, src) in bytes
.chunks_exact_mut(size_of::<u64>())
.zip(self.x.into_iter())
{
for (dst, src) in bytes.chunks_exact_mut(size_of::<u64>()).zip(self.x) {
dst.copy_from_slice(&u64::to_be_bytes(src));
}
bytes