diff options
| author | Yotam Ofek <yotam.ofek@gmail.com> | 2025-02-05 12:54:31 +0000 |
|---|---|---|
| committer | Yotam Ofek <yotam.ofek@gmail.com> | 2025-02-17 18:38:13 +0000 |
| commit | a7a43cd37308b774e4d562f1dbaf2793461ae09e (patch) | |
| tree | 18ef634dc3a7cb032a4a64236bed471d7d16e255 /src | |
| parent | ce36a966c79e109dabeef7a47fe68e5294c6d71e (diff) | |
| download | rust-a7a43cd37308b774e4d562f1dbaf2793461ae09e.tar.gz rust-a7a43cd37308b774e4d562f1dbaf2793461ae09e.zip | |
use `Iterator::zip` instead of enumerating+indexing
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 92ef3ab7a1d..dcc5fd12d81 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1150,9 +1150,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, }) |
