Skip to content

Commit

Permalink
make ItemSliceSend and Node only crate-visible
Browse files Browse the repository at this point in the history
`ItemSliceSend` still has the unsafe `Clone` implementation, so let's
not make it public. That also matches the visibility of most types in
`resolve.rs` (which is the only place these types are used).
  • Loading branch information
martinvonz committed Nov 16, 2023
1 parent 6e5ef3b commit 4f5ab36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gix-pack/src/cache/delta/traverse/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::marker::PhantomData;

use crate::cache::delta::Item;

pub struct ItemSliceSend<'a, T>
pub(crate) struct ItemSliceSend<'a, T>
where
T: Send,
{
Expand Down Expand Up @@ -41,7 +41,7 @@ where
unsafe impl<T> Send for ItemSliceSend<'_, T> where T: Send {}

/// An item returned by `iter_root_chunks`, allowing access to the `data` stored alongside nodes in a [`Tree`].
pub struct Node<'a, T: Send> {
pub(crate) struct Node<'a, T: Send> {
pub item: &'a mut Item<T>,
pub child_items: ItemSliceSend<'a, Item<T>>,
}
Expand Down

0 comments on commit 4f5ab36

Please sign in to comment.