Skip to content

Commit

Permalink
use Iterator::zip instead of enumerating+indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
yotamofek committed Feb 5, 2025
1 parent 07179d5 commit 213af27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,9 +1143,9 @@ fn clean_args_from_types_and_body_id<'tcx>(
Arguments {
values: types
.iter()
.enumerate()
.map(|(i, ty)| Argument {
name: name_from_pat(body.params[i].pat),
.zip(body.params)
.map(|(ty, param)| Argument {
name: name_from_pat(param.pat),
type_: clean_ty(ty, cx),
is_const: false,
})
Expand Down

0 comments on commit 213af27

Please sign in to comment.