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

bytes: Use a const {} block for this assertion #281

Open
github-actions bot opened this issue Jul 29, 2023 · 0 comments
Open

bytes: Use a const {} block for this assertion #281

github-actions bot opened this issue Jul 29, 2023 · 0 comments
Assignees
Labels
to do To be done tracker Issue tracked by bot

Comments

@github-actions
Copy link

On 2023-07-29 @prestwich wrote in aaa37d2 “Merge pull request #277 from DaniPopes/no_alloc”:

Use a const {} block for this assertion

    /// Rust issue [#60551].
    ///
    /// [#60551]: https://github.com/rust-lang/rust/issues/60551
    #[must_use]
    pub fn to_le_bytes<const BYTES: usize>(&self) -> [u8; BYTES] {
        // TODO: Use a `const {}` block for this assertion
        assert_eq!(BYTES, Self::BYTES, "BYTES must be equal to Self::BYTES");

        let mut bytes = [0; BYTES];

        #[cfg(target_endian = "little")]

From src/bytes.rs:94

@github-actions github-actions bot added to do To be done tracker Issue tracked by bot labels Jul 29, 2023
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