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:
parent
7596677370
commit
bf4d038c8d
11 changed files with 311 additions and 299 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue