1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 16:44:06 +02:00

move benchmarks to iai-callgrind

This commit is contained in:
Robin Appelman 2025-07-13 18:35:17 +02:00
commit bf4d038c8d
11 changed files with 311 additions and 299 deletions

View file

@ -1,5 +1,5 @@
/// Trait for specifying endianness of bit buffer
pub trait Endianness: private::Sealed {
pub trait Endianness: private::Sealed + Copy {
/// Get the endianness as string, either LittleEndian or BigEndian
fn as_string() -> &'static str {
if Self::is_le() {

View file

@ -123,7 +123,7 @@ where
/// ];
/// let buffer = BitReadBuffer::new(&bytes, LittleEndian);
/// ```
pub fn new(bytes: &'a [u8], _endianness: E) -> Self {
pub const fn new(bytes: &'a [u8], _endianness: E) -> Self {
let byte_len = bytes.len();
BitReadBuffer {