Tracking Issue for Iterator::{dedup, dedup_by, dedup_by_key} #83747
Labels
A-iterators
Area: Iterators
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Feature gate:
#![feature(iter_dedup)]
This is a tracking issue for the functions
std::iter::Iterator::{dedup, dedup_by, dedup_by_key}
as well as the structsstd::iter::{Dedup, ByKey, ByPartialEq}
.This feature provides similar functionality as the functions for slices and
Vec
s with the same name:Public API
Steps / History
dedup
,dedup_by
anddedup_by_key
to theIterator
trait #83748Unresolved Questions
Is there a way to reducededup
anddedup_by_key
to a call todedup_by
without creating an impossible function signature?Should we also implementSourceIter
andInPlaceIterable
for these structs?How should/can we react to an infinite iterator where all items are the same?Is there a way to turn this into a no-op for iterators which cannot contain duplicates (e.g.hashset.iter().dedup()
)?The text was updated successfully, but these errors were encountered: