diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-07 10:12:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-07 10:12:47 +0100 |
| commit | 4b6a22d05c38250d292c659f7343c45c52652206 (patch) | |
| tree | ece43dab749bb588cdcd2ffbbc1e075b787782cc /src/librustdoc/clean/mod.rs | |
| parent | 1155f01c5a599a06a0ee3b8ccd0d6ba411ad62d3 (diff) | |
| parent | 5d259224bd69425b44b4c83adc310cbf72b15855 (diff) | |
| download | rust-4b6a22d05c38250d292c659f7343c45c52652206.tar.gz rust-4b6a22d05c38250d292c659f7343c45c52652206.zip | |
Rollup merge of #138107 - yotamofek:pr/rustdoc/clippy, r=GuillaumeGomez
`librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in https://github.com/rust-lang/rust/pull/137320 , and [this comment](https://github.com/rust-lang/rust/pull/138090#discussion_r1983111856) r? ```@GuillaumeGomez```
Diffstat (limited to 'src/librustdoc/clean/mod.rs')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index fd528786d03..97ff4c2ef40 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2532,7 +2532,7 @@ fn clean_generic_args<'tcx>( ) -> GenericArgs { // FIXME(return_type_notation): Fix RTN parens rendering if let Some((inputs, output)) = generic_args.paren_sugar_inputs_output() { - let inputs = inputs.iter().map(|x| clean_ty(x, cx)).collect::<ThinVec<_>>().into(); + let inputs = inputs.iter().map(|x| clean_ty(x, cx)).collect(); let output = match output.kind { hir::TyKind::Tup(&[]) => None, _ => Some(Box::new(clean_ty(output, cx))), @@ -2553,8 +2553,7 @@ fn clean_generic_args<'tcx>( } hir::GenericArg::Infer(_inf) => GenericArg::Infer, }) - .collect::<ThinVec<_>>() - .into(); + .collect(); let constraints = generic_args .constraints .iter() |
