Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/external_trait_impls/rayon/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rayon::iter::{
};

/// Parallel iterator which returns a raw pointer to every full bucket in the table.
pub struct RawParIter<T> {
pub(crate) struct RawParIter<T> {
iter: RawIterRange<T>,
}

Expand Down Expand Up @@ -75,7 +75,7 @@ impl<T> UnindexedProducer for ParIterProducer<T> {
}

/// Parallel iterator which consumes a table and returns elements.
pub struct RawIntoParIter<T, A: Allocator = Global> {
pub(crate) struct RawIntoParIter<T, A: Allocator = Global> {
table: RawTable<T, A>,
}

Expand Down Expand Up @@ -108,7 +108,7 @@ impl<T: Send, A: Allocator + Send> ParallelIterator for RawIntoParIter<T, A> {
}

/// Parallel iterator which consumes elements without freeing the table storage.
pub struct RawParDrain<'a, T, A: Allocator = Global> {
pub(crate) struct RawParDrain<'a, T, A: Allocator = Global> {
// We don't use a &'a mut RawTable<T> because we want RawParDrain to be
// covariant over T.
table: NonNull<RawTable<T, A>>,
Expand Down Expand Up @@ -206,22 +206,22 @@ impl<T> Drop for ParDrainProducer<T> {
impl<T, A: Allocator> RawTable<T, A> {
/// Returns a parallel iterator over the elements in a `RawTable`.
#[cfg_attr(feature = "inline-more", inline)]
pub unsafe fn par_iter(&self) -> RawParIter<T> {
pub(crate) unsafe fn par_iter(&self) -> RawParIter<T> {
RawParIter {
iter: self.iter().iter,
}
}

/// Returns a parallel iterator over the elements in a `RawTable`.
#[cfg_attr(feature = "inline-more", inline)]
pub fn into_par_iter(self) -> RawIntoParIter<T, A> {
pub(crate) fn into_par_iter(self) -> RawIntoParIter<T, A> {
RawIntoParIter { table: self }
}

/// Returns a parallel iterator which consumes all elements of a `RawTable`
/// without freeing its memory allocation.
#[cfg_attr(feature = "inline-more", inline)]
pub fn par_drain(&mut self) -> RawParDrain<'_, T, A> {
pub(crate) fn par_drain(&mut self) -> RawParDrain<'_, T, A> {
RawParDrain {
table: NonNull::from(self),
marker: PhantomData,
Expand Down
4 changes: 2 additions & 2 deletions src/raw/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod inner {
#[cfg(test)]
pub use crate::alloc::alloc::AllocError;
use crate::alloc::alloc::Layout;
pub use crate::alloc::alloc::{Allocator, Global};
pub(crate) use crate::alloc::alloc::{Allocator, Global};
use core::ptr::NonNull;

#[allow(clippy::map_err_ignore)]
Expand All @@ -34,7 +34,7 @@ mod inner {
use crate::alloc::alloc::Layout;
#[cfg(test)]
pub use allocator_api2::alloc::AllocError;
pub use allocator_api2::alloc::{Allocator, Global};
pub(crate) use allocator_api2::alloc::{Allocator, Global};
use core::ptr::NonNull;

#[allow(clippy::map_err_ignore)]
Expand Down
Loading