Skip to content

Commit

Permalink
Improve the documentation of Bbbul
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Dec 10, 2024
1 parent 2b3399e commit 22c2768
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/bbbul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ use bumpalo::Bump;

pub use bitpacking::{BitPacker, BitPacker1x, BitPacker4x, BitPacker8x};

/// A `Bbbul` is a list of arbitrary `u32`s that can be only read once
/// it as been frozzen by casting or wrapping it into a [`FrozenBbbul`].
/// A Bit-packed Bumpalo-Based Unsigned integers Linked-list is a list
/// of arbitrary `u32`s that can be only read once it as been frozzen
/// by casting or wrapping it into a [`FrozenBbbul`].
///
/// ```
/// use std::collections::HashSet;
Expand Down Expand Up @@ -241,11 +242,11 @@ impl<'bump, B> FrozenBbbul<'bump, B> {
/// - The FrozenBbbul does not leak a shared reference to the allocator.
///
/// So, it is safe to send the contained shared reference to the allocator
unsafe impl<'bump, B> Send for FrozenBbbul<'bump, B> {}
unsafe impl<B> Send for FrozenBbbul<'_, B> {}

/// An non-standard iterator over the `u32`s in the [`FrozenBbbul`] type.
///
/// Returns the `u32`s in arbitrary order.
/// Returns slices of ordered `u32`s.
pub struct IterAndClear<'bump, B> {
area_len: usize,
area: &'bump mut [u32],
Expand Down

0 comments on commit 22c2768

Please sign in to comment.