Skip to content

Commit

Permalink
increase region count for ByteQueue as the ByteData size was lowe…
Browse files Browse the repository at this point in the history
…red to 16 bytes
  • Loading branch information
TimLuq committed Aug 6, 2024
1 parent c4426bb commit dd1360f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/queue/linked_node_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ use core::mem::MaybeUninit;

use crate::ByteData;

#[cfg(feature = "alloc")]
const NODE_SIZE: usize = 15;

#[cfg(not(feature = "alloc"))]
const NODE_SIZE: usize = 23;

pub(super) struct LinkedNodeData<'a> {
pub(super) data: [MaybeUninit<crate::ByteData<'a>>; 8],
pub(super) data: [MaybeUninit<crate::ByteData<'a>>; NODE_SIZE],
pub(super) beg: u8,
pub(super) len: u8,
}
Expand Down
4 changes: 4 additions & 0 deletions src/shared_bytes_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ impl SharedBytesBuilder {
}

/// Creates a new `SharedBytesBuilder`.
///
/// # Panics
///
/// Panics if the alignment is not a power of two or is greater than 512 or the maximum allowed by the system.
#[inline]
#[must_use]
pub const fn with_alignment(alignment: usize) -> Self {
Expand Down

0 comments on commit dd1360f

Please sign in to comment.