`support/borsh`: Replace the unsafety with `generic_const_exprs` when
- Dominant language
- Rust
- Stars
- 225
- Forks
- 70
- Avg merge
- 16h 54m
- Merged PRs (30d)
- 8
Description
*On 2024-12-30 @prestwich wrote in [`6a513a0`](https://github.com/recmo/uint/commit/6a513a0f92d7714b8a2965712c26f63a6e76891e) “Merge pull request #424 from Evalir/evalir/copy-to-buf”:*
Replace the unsafety with `generic_const_exprs` when
available
```rust
#[inline]
fn serialize(&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 safely
```
*From [`src/support/borsh.rs:47`](https://github.com/recmo/uint/blob/6a513a0f92d7714b8a2965712c26f63a6e76891e/src/support/borsh.rs#L47)*
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.