-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature request: generic over the underlying vector like container #31
Comments
I think you are misunderstanding what this crate does. It doesn't just provide a new-type you check the len>1 invariant on construction (you can always do that with just a few lines of code). It provides a full
And same for As you might have noticed most of this functionality doesn't apply to And at least when I wrote that crate using generics wasn't very feasible (probably is different by now). But even if it's feasible it's not convenient, i.e. requires a bunch of custom Traits and getting all the ~55 trait implementations right (as in exactly the same behavior as now) isn't trivial. Furthermore I don't want to release a v2 of this crate as it would be annoying for anyone using Oh and |
Making this struct's inner type a generic parameter would mean it could also be used with String, boxed slices, and borrowed slices.
If Index doesn't provide enough features, an alternative would be AsRef<[T]>.
The text was updated successfully, but these errors were encountered: