Skip to content

Commit c5e2c95

Browse files
committed
Fix unreachable_pub lint
1 parent 4ae9aaa commit c5e2c95

File tree

4 files changed

+72
-62
lines changed

4 files changed

+72
-62
lines changed

src/external_trait_impls/rayon/raw.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rayon::iter::{
1010
};
1111

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

@@ -75,7 +75,7 @@ impl<T> UnindexedProducer for ParIterProducer<T> {
7575
}
7676

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

@@ -108,7 +108,7 @@ impl<T: Send, A: Allocator + Send> ParallelIterator for RawIntoParIter<T, A> {
108108
}
109109

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

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

221221
/// Returns a parallel iterator which consumes all elements of a `RawTable`
222222
/// without freeing its memory allocation.
223223
#[cfg_attr(feature = "inline-more", inline)]
224-
pub fn par_drain(&mut self) -> RawParDrain<'_, T, A> {
224+
pub(crate) fn par_drain(&mut self) -> RawParDrain<'_, T, A> {
225225
RawParDrain {
226226
table: NonNull::from(self),
227227
marker: PhantomData,

src/raw/alloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mod inner {
1111
#[cfg(test)]
1212
pub use crate::alloc::alloc::AllocError;
1313
use crate::alloc::alloc::Layout;
14-
pub use crate::alloc::alloc::{Allocator, Global};
14+
pub(crate) use crate::alloc::alloc::{Allocator, Global};
1515
use core::ptr::NonNull;
1616

1717
#[allow(clippy::map_err_ignore)]
@@ -34,7 +34,7 @@ mod inner {
3434
use crate::alloc::alloc::Layout;
3535
#[cfg(test)]
3636
pub use allocator_api2::alloc::AllocError;
37-
pub use allocator_api2::alloc::{Allocator, Global};
37+
pub(crate) use allocator_api2::alloc::{Allocator, Global};
3838
use core::ptr::NonNull;
3939

4040
#[allow(clippy::map_err_ignore)]

0 commit comments

Comments
 (0)