You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On 2024-12-24 @prestwich wrote in e94bb80 “Merge pull request #416 from rtrombone/borsh”:
Replace the unsafety with generic_const_exprs when
available
fn deserialize_reader<R: io::Read>(reader:&mutR) -> io::Result<Self>{// This is a bit of an end-run around missing `generic_const_exprs`// We cannot declare a `[u8; Self::BYTES]` or `[u8; LIMBS * 8]`,// so we declare a `[u8; LIMBS]` and use unsafe to write to it.// TODO: Replace the unsafety with `generic_const_exprs` when// availableletmut limbs = [0u64;LIMBS];// SAFETY: `limbs` is known to have identical memory layout and// alignment to `[u8; LIMBS * 8]`, which is guaranteed to safely// contain [u8; Self::BYTES]`, as `LIMBS * 8 >= Self::BYTES`.
On 2024-12-24 @prestwich wrote in
e94bb80
“Merge pull request #416 from rtrombone/borsh”:Replace the unsafety with
generic_const_exprs
whenavailable
From
src/support/borsh.rs:16
The text was updated successfully, but these errors were encountered: