Skip to content

Commit

Permalink
hybrid-array: remove Array::from_slice (#1018)
Browse files Browse the repository at this point in the history
It duplicates `TryFrom`
  • Loading branch information
tarcieri committed Dec 31, 2023
1 parent 14e75ca commit 3e97167
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions hybrid-array/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ where
Self(FromFn::from_fn(cb))
}

/// Create array from a slice.
// TODO(tarcieri): deprecate this before the v0.2 release
// #[deprecated(since = "0.2.0", note = "use TryFrom instead")]
pub fn from_slice(slice: &[T]) -> Result<Self, TryFromSliceError>
where
Self: Copy,
{
slice.try_into()
}

/// Returns an iterator over the array.
#[inline]
pub fn iter(&self) -> Iter<'_, T> {
Expand Down

0 comments on commit 3e97167

Please sign in to comment.