Rollup merge of #106137 - matthiaskrgr:clippy_style, r=jyn514

fix more clippy::style findings

match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed

r? `@compiler-errors`
This commit is contained in:
Matthias Krüger
2022-12-25 22:15:00 +01:00
committed by GitHub
16 changed files with 73 additions and 92 deletions

View File

@@ -2029,7 +2029,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
&mut self,
output: &FnRetTy,
span: Span,
mut nested_impl_trait_context: ImplTraitContext,
nested_impl_trait_context: ImplTraitContext,
) -> hir::GenericBound<'hir> {
// Compute the `T` in `Future<Output = T>` from the return type.
let output_ty = match output {
@@ -2037,7 +2037,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
// Not `OpaqueTyOrigin::AsyncFn`: that's only used for the
// `impl Future` opaque type that `async fn` implicitly
// generates.
self.lower_ty(ty, &mut nested_impl_trait_context)
self.lower_ty(ty, &nested_impl_trait_context)
}
FnRetTy::Default(ret_ty_span) => self.arena.alloc(self.ty_tup(*ret_ty_span, &[])),
};