Skip to content

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

Merged
merged 1 commit into from
Jan 23, 2015
Merged

Some core::iter improvements #21382

merged 1 commit into from
Jan 23, 2015

Conversation

tshepang
Copy link
Member

No description provided.

@rust-highfive
Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member

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?

@alexcrichton alexcrichton assigned alexcrichton and unassigned aturon Jan 20, 2015
#[inline]
#[stable]
fn size_hint(&self) -> (uint, Option<uint>) { (0, None) }
fn size_hint(&self) -> (usize, Option<usize>) { (0, None) }
Copy link
Member

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?

Copy link
Member Author

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.

@steveklabnik
Copy link
Member

Because this updates actual code, it needs [breaking-change], right?

@tshepang
Copy link
Member Author

@steveklabnik what code would this break? Those are just aliases right?

@steveklabnik
Copy link
Member

I'm not 100% sure, hence the asking :)

@tshepang
Copy link
Member Author

Oh, ok.

There are doc improvements as well as these conversions:

- int/uint -> isize/usize
- u/i -> us/is
@tshepang tshepang changed the title Improve iter docs Some core::iter improvements Jan 22, 2015
@alexcrichton
Copy link
Member

@bors r+ 9091e04

Leaving off [breaking-change] is fine because usize and uint are currently just aliases for the same type.

@tshepang
Copy link
Member Author

I am 💃-ing to the approval :)

@bors
Copy link
Collaborator

bors commented Jan 23, 2015

⌛ Testing commit 9091e04 with merge aedcbb9...

@bors bors merged commit 9091e04 into rust-lang:master Jan 23, 2015
@tshepang tshepang deleted the improve-iter-docs branch January 23, 2015 12:44
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

Successfully merging this pull request may close these issues.

7 participants