Compare commits

..

3 Commits

Author SHA1 Message Date
Leonora Tindall 890174fd3e
feat: meta update; this is 0.2.0! 2021-11-07 13:09:50 -06:00
Leonora Tindall ce4702c7b6
feat: add Into<> impls for ExactSlice and MinSlice 2021-11-07 13:08:55 -06:00
Leonora Tindall f6d43cd200
feat: add conversion methods 2021-11-07 13:08:54 -06:00
2 changed files with 1 additions and 19 deletions

View File

@ -8,8 +8,4 @@ license = "MIT"
keywords = ["memory", "slice", "array"]
categories = ["data-structures"]
repository = "https://git.nora.codes/nora/nslice"
[features]
nightly = []
default = ["nightly"]
readme = "README.md"

View File

@ -83,20 +83,6 @@ impl<T, const N: usize> MinSlice<T, N> {
MinSlice::<T, M>::from_mut(self.as_mut_slice())
}
/// Extend the `MinSlice`, returning a new `Some(&MinSlice<T, N + I>)`
/// if there are at least `I` `T`s in `tail`.
#[cfg(feature = "nightly")]
pub fn extend_by<const I: usize>(&self) -> Option<&MinSlice<T, {N + I}>> {
MinSlice::<T, {N + I}>::from_slice(self.as_slice())
}
/// Extend the `MinSlice`, returning a new `Some(&mut MinSlice<T, N + I>)`
/// if there are at least `I` `T`s in `tail`.
#[cfg(feature = "nightly")]
pub fn extend_by_mut<const I: usize>(&mut self) -> Option<&mut MinSlice<T, {N + I}>> {
MinSlice::<T, {N + I}>::from_mut(self.as_mut_slice())
}
/// Get a reference to a value from the `MinSlice` by index.
///
/// Return `Some(&T)` for the `T` at index `i` if `i < (N + self.tail.len)`,