diff --git a/CHANGELOG.md b/CHANGELOG.md index d55ee641..ab1ef007 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,10 +13,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - **Breaking**: `Array` `retrieve_` methods now return `Vec`/`Vec` instead of `Box<[u8]>`/`Box<[T]>` - This avoids potential internal reallocations - - **Breaking**: Remove `StorePrefixError::new`, deprecated since `v0.7.3` - **Breaking**: `StoreKey::parent` now returns `StorePrefix` instead of `Option` - **Breaking**: `ZipStorageAdapter::{new,new_with_path}` now take a `StoreKey` +### Removed + - **Breaking**: Remove `StorePrefixError::new`, deprecated since `v0.7.3` + - **Breaking**: Remove `ArraySubset::{in_subset,in_subset_unchecked}`, deprecated since `v0.7.2` + ### Fixed - Disallow an empty string for a `StoreKey` diff --git a/src/array_subset.rs b/src/array_subset.rs index f3502d8f..0bf6813b 100644 --- a/src/array_subset.rs +++ b/src/array_subset.rs @@ -639,55 +639,6 @@ impl ArraySubset { ChunksIterator::new_unchecked(self, chunk_shape) } - #[deprecated( - since = "0.7.2", - note = "please use `overlap` and `relative_to` instead" - )] - /// Return the subset of this array subset in `subset_other`. - /// The start of the returned array subset is from the start of this array subset. - /// - /// # Errors - /// - /// Returns [`IncompatibleDimensionalityError`] if the dimensionality of `subset_other` does not match the dimensionality of this array subset. - pub fn in_subset(&self, subset_other: &Self) -> Result { - if subset_other.dimensionality() == self.dimensionality() { - #[allow(deprecated)] - Ok(unsafe { self.in_subset_unchecked(subset_other) }) - } else { - Err(IncompatibleDimensionalityError::new( - subset_other.dimensionality(), - self.dimensionality(), - )) - } - } - - #[deprecated( - since = "0.7.2", - note = "please use `overlap` and `relative_to` instead" - )] - /// Return the subset of this array subset in `subset_other`. - /// The start of the returned array subset is from the start of this array subset. - /// - /// # Safety - /// Panics if the dimensionality of `subset_other` does not match the dimensionality of this array subset. - #[must_use] - pub unsafe fn in_subset_unchecked(&self, subset_other: &Self) -> Self { - debug_assert_eq!(subset_other.dimensionality(), self.dimensionality()); - let mut ranges = Vec::with_capacity(self.dimensionality()); - for (start, size, other_start, other_size) in izip!( - &self.start, - &self.shape, - subset_other.start(), - subset_other.shape(), - ) { - let output_start = start.saturating_sub(*other_start); - let output_end = - std::cmp::min((start + size).saturating_sub(*other_start), *other_size); - ranges.push(output_start..output_end); - } - Self::new_with_ranges(&ranges) - } - /// Return the overlapping subset between this array subset and `subset_other`. /// /// # Errors