mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
November 2023 - Rust Nightly Update (#413)
* Update nightly * Replace .get(0) with .first() * allow new clippy lint --------- Co-authored-by: GitHub Actions <> Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ae449535ff
commit
a2089c61fb
@@ -392,7 +392,7 @@ impl ReadWrite for Transaction {
|
||||
// is impossible since we'll only read up to u16::MAX items.
|
||||
writer.write_all(&u16::try_from(shares.len()).unwrap().to_le_bytes())?;
|
||||
|
||||
let share_len = shares.get(0).map(|share| share.len()).unwrap_or(0);
|
||||
let share_len = shares.first().map(|share| share.len()).unwrap_or(0);
|
||||
// For BLS12-381 G2, this would be:
|
||||
// - A 32-byte share
|
||||
// - A 96-byte ephemeral key
|
||||
|
||||
@@ -33,5 +33,5 @@ pub(crate) fn merkle(hash_args: &[[u8; 32]]) -> [u8; 32] {
|
||||
hashes = interim;
|
||||
}
|
||||
|
||||
hashes.get(0).copied().map(Into::into).unwrap_or(zero)
|
||||
hashes.first().copied().map(Into::into).unwrap_or(zero)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user