From e3ce88f6f25901b1d33fbc5f931a9d8f90b9e2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 18 Jun 2021 14:40:51 +0300 Subject: Minor clippy perf fixes --- crates/hir_expand/src/builtin_macro.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir_expand') diff --git a/crates/hir_expand/src/builtin_macro.rs b/crates/hir_expand/src/builtin_macro.rs index f24d1d919..4c83a2efe 100644 --- a/crates/hir_expand/src/builtin_macro.rs +++ b/crates/hir_expand/src/builtin_macro.rs @@ -202,7 +202,7 @@ fn assert_expand( let arg_tts = args.into_iter().flat_map(|arg| { quote! { &(#arg), } - }.token_trees).collect::>(); + }.token_trees); let expanded = quote! { { { (##arg_tts); } } @@ -254,7 +254,7 @@ fn format_args_expand( let _format_string = args.remove(0); let arg_tts = args.into_iter().flat_map(|arg| { quote! { std::fmt::ArgumentV1::new(&(#arg), std::fmt::Display::fmt), } - }.token_trees).collect::>(); + }.token_trees); let expanded = quote! { std::fmt::Arguments::new_v1(&[], &[##arg_tts]) }; -- cgit v1.2.3