Skip to content

Commit a7a43cd

Browse files
committed
use Iterator::zip instead of enumerating+indexing
1 parent ce36a96 commit a7a43cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/clean/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1150,9 +1150,9 @@ fn clean_args_from_types_and_body_id<'tcx>(
11501150
Arguments {
11511151
values: types
11521152
.iter()
1153-
.enumerate()
1154-
.map(|(i, ty)| Argument {
1155-
name: name_from_pat(body.params[i].pat),
1153+
.zip(body.params)
1154+
.map(|(ty, param)| Argument {
1155+
name: name_from_pat(param.pat),
11561156
type_: clean_ty(ty, cx),
11571157
is_const: false,
11581158
})

0 commit comments

Comments
 (0)