alloy-rs / alloy-rs/ruint

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

Abierto
#425 3 comentarios 0 reacciones 1 asignado Reclamado por @prestwich Ver en GitHub
to do tracker
Lenguaje dominante
Rust
Estrellas
225
Forks
70
Merge medio
16 h 54 min
PR fusionados (30 d)
8

Descripción

*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)*

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.