Skip to content

Conversation

bluss
Copy link
Contributor

@bluss bluss commented Jul 16, 2013

Implement set difference, sym. difference, intersection and union using Iterators.

The set methods are left since they are part of the Set trait. A grep over the tree indicates that the four hashset operations have no users at all.

Also remove HashMap::mutate_values since it is unused, replaced by .mut_iter(), and not part of a trait.

@bluss
Copy link
Contributor Author

bluss commented Jul 16, 2013

I reported issue #7814 for the .filter() issue marked with FIXME in the code. It's possible to implement the iterators directly, instead of using filter and chain combinators. Would that be better?

The internal iterator methods are unused, but still part of the Set trait.

@huonw
Copy link
Contributor

huonw commented Jul 16, 2013

@blake2-ppc neater to use the combinators, I think; less possibility for bugs in that part of the implementation.

Implement the difference, union, etc iterators with the help of a custom
iterator combinator with explicit closure environment. Reported issue #7814
to be able to use the std::iterator filter combinator.
@bluss
Copy link
Contributor Author

bluss commented Jul 16, 2013

repushed, forgot to mark the new methods pub :|

bors added a commit that referenced this pull request Jul 16, 2013
Implement set difference, sym. difference, intersection and union using Iterators.

The set methods are left since they are part of the Set trait. A grep over the tree indicates that the four hashset operations have no users at all.

Also remove HashMap::mutate_values since it is unused, replaced by .mut_iter(), and not part of a trait.
@bors bors closed this Jul 16, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 21, 2021
Fix typo in example for `match_result_ok`

changelog: Fix typo in example for ``[`match_result_ok`]``
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.

3 participants