Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support/borsh: Replace the unsafety with generic_const_exprs when #425

Open
github-actions bot opened this issue Dec 30, 2024 · 0 comments
Open

support/borsh: Replace the unsafety with generic_const_exprs when #425

github-actions bot opened this issue Dec 30, 2024 · 0 comments
Assignees
Labels
to do To be done tracker Issue tracked by bot

Comments

@github-actions
Copy link

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 safely

From src/support/borsh.rs:47

@github-actions github-actions bot added to do To be done tracker Issue tracked by bot labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to do To be done tracker Issue tracked by bot
Projects
None yet
Development

No branches or pull requests

1 participant