From 4b120c0813f4f86ee8382b192f8efdeaaac73b21 Mon Sep 17 00:00:00 2001 From: Lachlan Deakin Date: Mon, 23 Dec 2024 19:40:16 +1100 Subject: [PATCH] fix: seal `ArrayShardedReadableExt` --- zarrs/src/array/array_sync_sharded_readable_ext.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zarrs/src/array/array_sync_sharded_readable_ext.rs b/zarrs/src/array/array_sync_sharded_readable_ext.rs index cb97dafb..c18f02f0 100644 --- a/zarrs/src/array/array_sync_sharded_readable_ext.rs +++ b/zarrs/src/array/array_sync_sharded_readable_ext.rs @@ -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 { +pub trait ArrayShardedReadableExt: private::Sealed { /// Read and decode the inner chunk at `chunk_indices` into its bytes. /// /// See [`Array::retrieve_chunk_opt`]. @@ -472,6 +472,14 @@ impl ArrayShardedReadableExt } } +mod private { + use super::*; + + pub trait Sealed {} + + impl Sealed for Array {} +} + #[cfg(test)] mod tests { use std::sync::Arc;