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

iter: merge Cloned and Inspect into Map #23062

Closed
wants to merge 1 commit into from

Conversation

laijs
Copy link

@laijs laijs commented Mar 5, 2015

The code of the Map, Cloned and Inspect are the same except the name
and the mapping call.

Signed-off-by: Lai Jiangshan [email protected]

The code of the Map, Cloned and Inspect are the same except the name
and the mapping call.

Signed-off-by: Lai Jiangshan <[email protected]>
@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -1273,60 +1269,21 @@ impl<T: Clone> MinMaxResult<T> {
/// An iterator that clones the elements of an underlying iterator
#[unstable(feature = "core", reason = "recent addition")]
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
#[derive(Clone)]
pub struct Cloned<I> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a newtype structure which is opaque to its contents is an intentional decision on behalf of std::iter. It allows us to flexibly change the representation in the future if necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same for Inspect down below)

@bors
Copy link
Contributor

bors commented Mar 7, 2015

☔ The latest upstream changes (presumably #23107) made this pull request unmergeable. Please resolve the merge conflicts.

@laijs laijs closed this Mar 7, 2015
@laijs laijs deleted the merge-cloned-inspect-into-map branch March 7, 2015 17:08
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.

5 participants