mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Rename into_nonempty_slice to as_nonempty_slice
This commit is contained in:
parent
0a98580277
commit
01892dcf20
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ impl<T> Slice<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn into_nonempty_slice(&self) -> Option<NonEmptySlice<T>> {
|
||||
pub fn as_nonempty_slice(&self) -> Option<NonEmptySlice<T>> {
|
||||
NonZeroU16::new(self.length).map(|nonzero_len| NonEmptySlice::new(self.start, nonzero_len))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue