-
Notifications
You must be signed in to change notification settings - Fork 60
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
Implement Index<Range>, Index<RangeFrom>, Index<RangeTo>, Index<RangeFull> #13
Comments
Ah, hehe. The NOPE NOPE NOPE is me being upset that we need to "hack" around the Index trait's design by outputting references to TRUE or FALSE statics. It's workable; just stupid. |
That said, I don't think you can use indexing for bit-ranges. You can't return an |
yes, it makes sense. Since nom uses a lot of macros, I just need to trick it into thinking it is a real slice. Maybe by returning a |
I'm not sure adding it to this crate would be worth the trouble if it is only used in nom. But then, my only option is to duplicate the code, since I can't implement the traits on |
How would you return a (hence the desire for IndexGet) |
Hi!
People are asking for bit level parsing in nom, and to use
BitVec
, I would need to implement those traits to get the slicing syntax on bit streams.I see in the code that
Index<usize>
is already implemented, but there's a big warning. Could you explain what it means?I can try to implement those, but I wonder if you would accept it (because of that warning)
The text was updated successfully, but these errors were encountered: