mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Switch zip to zip_equal where possible (#6389)
There are two uses I'm not converting here, that seem to want the "shortest" behavior. For everything else, I'm going to `zip_equal` since it's more restrictive. I wish `zip` were named `zip_shortest`.
This commit is contained in:
@@ -527,7 +527,7 @@ auto MatchContext::DoEmitPatternMatch(Context& context,
|
||||
auto add_all_subscrutinees =
|
||||
[&](llvm::ArrayRef<SemIR::InstId> subscrutinee_ids) {
|
||||
for (auto [subpattern_id, subscrutinee_id] :
|
||||
llvm::reverse(llvm::zip(subpattern_ids, subscrutinee_ids))) {
|
||||
llvm::reverse(llvm::zip_equal(subpattern_ids, subscrutinee_ids))) {
|
||||
AddWork(
|
||||
{.pattern_id = subpattern_id, .scrutinee_id = subscrutinee_id});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user