diff options
| author | Yotam Ofek <yotam.ofek@gmail.com> | 2025-09-27 20:57:50 +0300 | 
|---|---|---|
| committer | Yotam Ofek <yotam.ofek@gmail.com> | 2025-09-29 08:08:05 +0300 | 
| commit | 68a7c250788833305f73f816b284aafa9e62370a (patch) | |
| tree | fc0eef15595f8d6272d6508ddbfe9c31c3fa5175 /compiler/rustc_parse/src/parser/tokenstream | |
| parent | f957826bff7a68b267ce75b1ea56352aed0cca0a (diff) | |
| download | rust-68a7c250788833305f73f816b284aafa9e62370a.tar.gz rust-68a7c250788833305f73f816b284aafa9e62370a.zip | |
Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library
Diffstat (limited to 'compiler/rustc_parse/src/parser/tokenstream')
| -rw-r--r-- | compiler/rustc_parse/src/parser/tokenstream/tests.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/compiler/rustc_parse/src/parser/tokenstream/tests.rs b/compiler/rustc_parse/src/parser/tokenstream/tests.rs index 19b2c98f5af..63177a72744 100644 --- a/compiler/rustc_parse/src/parser/tokenstream/tests.rs +++ b/compiler/rustc_parse/src/parser/tokenstream/tests.rs @@ -15,7 +15,7 @@ fn sp(a: u32, b: u32) -> Span { } fn cmp_token_stream(a: &TokenStream, b: &TokenStream) -> bool { - a.len() == b.len() && a.iter().zip(b.iter()).all(|(x, y)| x.eq_unspanned(y)) + a.iter().eq_by(b.iter(), |x, y| x.eq_unspanned(y)) } #[test] | 
