-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Move most iter functionality to extra, fixes #7343 #7474
Conversation
@Seldaek: this looks good, removing just needs to be rebased and I guess some use statements need to be updated |
Rebased, seems to compile fine. I'm still unsure whether leaving core::iter::Times there is a good idea or not. It feels messy to have core::iter and extra::iter, but if it's transitional then I guess it's fine. Just trying to help close an issue but I don't have enough of a big picture to tell. |
Scratch my last comment, it does not compile at all - there are indeed a bunch of places using std::iter still, and I frankly don't know what to do about some of them but I'll keep looking. |
OK I had to implement an EnumSetIterator to be able to keep things working reasonably, and now I think it's good. Last I checked everything builds and the test suite passes. |
} | ||
|
||
fn size_hint(&self) -> (Option<uint>, Option<uint>) { | ||
let exact = Some(self.orig_bits.population_count()); |
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.
The size_hint represents the number of elements remaining, so you probably want to use self.bits
here (I think).
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.
Good point, I misunderstood that, the orig_bits property can completely disappear then. I updated the PR.
I think it's WIP - but I wanted to ask for feedback (/cc @thestinger) I had to move the impl of FromIter for vec into extra::iter because I don't think std can depend on extra, but that's a bit messed up. Similarly some FromIter uses are gone now, not sure if this is fixable or if I made a complete mess here..
Use lang items for BinOp lints changelog: none
I think it's WIP - but I wanted to ask for feedback (/cc @thestinger)
I had to move the impl of FromIter for vec into extra::iter because I don't think std can depend on extra, but that's a bit messed up. Similarly some FromIter uses are gone now, not sure if this is fixable or if I made a complete mess here..