Compare commits
3 Commits
cf7216939b
...
890174fd3e
Author | SHA1 | Date |
---|---|---|
Leonora Tindall | 890174fd3e | |
Leonora Tindall | ce4702c7b6 | |
Leonora Tindall | f6d43cd200 |
|
@ -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"
|
||||
|
|
14
src/lib.rs
14
src/lib.rs
|
@ -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)`,
|
||||
|
|
Loading…
Reference in New Issue