Open
Description
Feature gate: #![feature(iter_contains)]
This is a tracking issue for a method of the Iterator
trait that checks whether an iterator contains an item.
A method of the iterator trait to check whether it contains an element.
It goes over all the elements in the iterator and checks if they are in the collection.
Public API
fn contains<Q: ?Sized>(&mut self, item: Q) -> bool
where
Q: PartialEq<Self::Item>,
Self: Sized,
Steps / History
- ACP: Adding the contains method for the iterator trait libs-team#408
- Implementation: Add experimental Iterator::contains #135018
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.