From 4f5ab3650250159bc3b5521e79cdc390aeb3f4ae Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 15 Nov 2023 22:05:08 -0800 Subject: [PATCH] make ItemSliceSend and Node only crate-visible `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). --- gix-pack/src/cache/delta/traverse/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gix-pack/src/cache/delta/traverse/util.rs b/gix-pack/src/cache/delta/traverse/util.rs index 90192d88579..5807846df5e 100644 --- a/gix-pack/src/cache/delta/traverse/util.rs +++ b/gix-pack/src/cache/delta/traverse/util.rs @@ -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, { @@ -41,7 +41,7 @@ where unsafe impl 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, pub child_items: ItemSliceSend<'a, Item>, }