diff --git a/CHANGELOG.md b/CHANGELOG.md index 08b420b3..dee5cafa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `with_` methods to `{Array,Group}MetadataOptions` - Add `zarr_v2_to_v3` example - Add `{Array,Group}::to_v3()` +- Add `ShardingCodecBuilder::build_arc()` ### Changed - Bump `unsafe_cell_slice` to 0.2.0 diff --git a/zarrs/src/array/codec/array_to_bytes/sharding/sharding_codec_builder.rs b/zarrs/src/array/codec/array_to_bytes/sharding/sharding_codec_builder.rs index 6c065094..db37d6e8 100644 --- a/zarrs/src/array/codec/array_to_bytes/sharding/sharding_codec_builder.rs +++ b/zarrs/src/array/codec/array_to_bytes/sharding/sharding_codec_builder.rs @@ -127,4 +127,10 @@ impl ShardingCodecBuilder { self.index_location, ) } + + /// Build into an [`Arc`]. + #[must_use] + pub fn build_arc(&self) -> Arc { + Arc::new(self.build()) + } }