-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Labels
Description
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
Reactions are currently unavailable