mirror of
https://github.com/logos-blockchain/sponges.git
synced 2026-07-30 02:23:31 +00:00
Pin Clippy version and fix lints (#59)
This commit is contained in:
parent
aa5da2013e
commit
690624016e
2
.github/workflows/workspace.yml
vendored
2
.github/workflows/workspace.yml
vendored
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user