Skip to content

Return an iterator from enum_variant_ids. #25926

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
Jun 2, 2015

Conversation

Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented May 31, 2015

No description provided.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

fn next(&mut self) -> Option<ast::DefId> {
self.iter.next().map(|p| translated_def_id(self.cdata, p))
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to use a better size_hint? It's important since the iterator is collected when used.

@Ms2ger Ms2ger force-pushed the enum_variant_ids branch from 8966fa1 to 9c837c0 Compare June 1, 2015 08:38
@Ms2ger
Copy link
Contributor Author

Ms2ger commented Jun 1, 2015

Done

@bluss
Copy link
Member

bluss commented Jun 1, 2015

Thanks! I think the answer to my question should have been “no”, unfortunately. The underlying iterators have no size information and maybe won't have since it's kind of a filtering operation. Thanks anyway and this sets it up to improve if the adapted iterator improves, though.

@alexcrichton
Copy link
Member

@bors: r+ 9c837c0

@bors
Copy link
Collaborator

bors commented Jun 2, 2015

⌛ Testing commit 9c837c0 with merge dc1e79b...

@bors bors merged commit 9c837c0 into rust-lang:master Jun 2, 2015
@Ms2ger Ms2ger deleted the enum_variant_ids branch June 3, 2015 18:36
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.

6 participants