Skip to content

Commit

Permalink
fix: seal ArrayShardedReadableExt
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Dec 23, 2024
1 parent 9151ab2 commit 4b120c0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion zarrs/src/array/array_sync_sharded_readable_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl ArrayShardedReadableExtCache {
///
/// Sharding indexes are cached in a [`ArrayShardedReadableExtCache`] enabling faster retrieval.
// TODO: Add default methods? Or change to options: Option<&CodecOptions>? Should really do this for array (breaking)...
pub trait ArrayShardedReadableExt<TStorage: ?Sized + ReadableStorageTraits + 'static> {
pub trait ArrayShardedReadableExt<TStorage: ?Sized + ReadableStorageTraits + 'static>: private::Sealed {
/// Read and decode the inner chunk at `chunk_indices` into its bytes.
///
/// See [`Array::retrieve_chunk_opt`].
Expand Down Expand Up @@ -472,6 +472,14 @@ impl<TStorage: ?Sized + ReadableStorageTraits + 'static> ArrayShardedReadableExt
}
}

mod private {
use super::*;

pub trait Sealed {}

impl<TStorage: ?Sized + ReadableStorageTraits + 'static> Sealed for Array<TStorage> {}
}

#[cfg(test)]
mod tests {
use std::sync::Arc;
Expand Down

0 comments on commit 4b120c0

Please sign in to comment.