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:
Jon Ross-Perkins
2025-11-18 00:28:06 +00:00
committed by GitHub
parent 205aea9a3e
commit fbc7690157
13 changed files with 34 additions and 31 deletions
+1 -1
View File
@@ -654,7 +654,7 @@ class Stringifier {
step_stack_->PushString("}");
llvm::ListSeparator sep;
for (auto [field, value_inst_id] :
llvm::reverse(llvm::zip(fields, field_values))) {
llvm::reverse(llvm::zip_equal(fields, field_values))) {
step_stack_->Push(".", field.name_id, " = ", value_inst_id, &sep);
}
}