-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
Description
On 2024-12-30 @prestwich wrote in 6a513a0 “Merge pull request #424 from Evalir/evalir/copy-to-buf”:
Replace the unsafety with generic_const_exprs when
available
#[inline]
fn serialize<W: io::Write>(&self, writer: &mut W) -> io::Result<()> {
#[cfg(target_endian = "little")]
return writer.write_all(self.as_le_slice());
// TODO: Replace the unsafety with `generic_const_exprs` when
// available
#[cfg(target_endian = "big")]
{
let mut limbs = [0u64; LIMBS];
// SAFETY: `limbs` is known to have identical memory layout and
// alignment to `[u8; LIMBS * 8]`, which is guaranteed to safelyReactions are currently unavailable