-
Notifications
You must be signed in to change notification settings - Fork 4
Add type NonEmptySlice
#17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This may seem unnecessary, but I noticed the majority of the methods in this crate actually don't have anything to do with a non-empty vector, but a slice. So, I factored it out into a separate type which can hopefully be useful on its own. |
Okay, that's the last of the changes I want to make for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, awesome.
NonEmptySlice
first
,split_last_mut
, etc.Deref<Target = [T]>
, for the rest of the methods we expect.NonEmpty
to implDeref<Target = NonEmptySlice>
.NonEmpty
's methods are now unnecessary, since we get them through theDeref
impl.