Skip to content
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

SliceExt not implemented for &[u8] #23446

Closed
mahkoh opened this issue Mar 17, 2015 · 1 comment
Closed

SliceExt not implemented for &[u8] #23446

mahkoh opened this issue Mar 17, 2015 · 1 comment

Comments

@mahkoh
Copy link
Contributor

mahkoh commented Mar 17, 2015

Since SliceExt::split conflicts with BufRead::split, you have to use SliceExt::split(var, cond). But this doesn't give you auto-deref and if var == &&[u8] you get the confusing message that SliceExt is not implemented for &[u8] and you have to first notice that var is &&[u8] and then remember that SliceExt is implemented on [u8] and not &[u8].

@alexcrichton
Copy link
Member

The purpose of the SliceExt trait is to provide methods on &[u8], not to provide the ability to abstract over them. Now that we have moved to inherent methods this is even more apparent. As a result this issue is also somewhat moot, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants