Tracking issue for iter_order_by · Issue #64295 · rust-lang/rust (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Landed in #62205
Public API
pub mod core { pub mod iter { mod traits { mod iterator { pub trait Iterator { fn cmp_by<I, F>(mut self, other: I, mut cmp: F) -> Ordering where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, I::Item) -> Ordering, { } fn partial_cmp_by<I, F>( mut self, other: I, mut partial_cmp: F, ) -> Option where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, I::Item) -> Option, { } fn eq_by<I, F>(mut self, other: I, mut eq: F) -> bool where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, I::Item) -> bool, { } } } } } }
Before stabilization:
- Stabilization PR
Open questions
- Should we use
size_hint
as an optimization for equality checking? That means buggy iterators may return incorrect results foreq_by
. We could optimize for just a handful ofTrustedLen
iterators instead.