alloy-rs / alloy-rs/ruint

`support/borsh`: Replace the unsafety with `generic_const_exprs` when

Open
#425 3 comments 0 reactions 1 assignee Claimed by @prestwich View on GitHub
to do tracker
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.