-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Some core::iter improvements #21382
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
Some core::iter improvements #21382
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -525,11 +518,10 @@ pub trait IteratorExt: Iterator + Sized { | |||
/// # Example | |||
/// | |||
/// ```rust | |||
/// let mut xs = range(0u, 10); | |||
/// let mut it = 0 ..10; |
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.
This looks like a typo, possibly 0..10
?
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.
It's deliberate... I saw it done like that somewhere in the codebase.
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.
I think that it may be a typo elsewhere as well, could this be updated to 0..10
?
#[inline] | ||
#[stable] | ||
fn size_hint(&self) -> (uint, Option<uint>) { (0, None) } | ||
fn size_hint(&self) -> (usize, Option<usize>) { (0, None) } |
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.
this isn't just docs, it seems?
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.
Yeah, I started with just docs and later noticed a lot more (miscellaneous) changes were needed.
Because this updates actual code, it needs |
@steveklabnik what code would this break? Those are just aliases right? |
I'm not 100% sure, hence the asking :) |
Oh, ok. |
There are doc improvements as well as these conversions: - int/uint -> isize/usize - u/i -> us/is
I am 💃-ing to the approval :) |
No description provided.