aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2021-06-18 12:40:51 +0100
committerLaurenČ›iu Nicola <[email protected]>2021-06-18 12:40:51 +0100
commite3ce88f6f25901b1d33fbc5f931a9d8f90b9e2b8 (patch)
treec6876d5f81bafe5d405f7ab72ff61e4a748a3bc5 /crates/hir_expand
parent0d863ccea96c6c3256fad12807a0eedbfccd8294 (diff)
Minor clippy perf fixes
Diffstat (limited to 'crates/hir_expand')
-rw-r--r--crates/hir_expand/src/builtin_macro.rs4
1 files changed, 2 insertions, 2 deletions
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(
202 202
203 let arg_tts = args.into_iter().flat_map(|arg| { 203 let arg_tts = args.into_iter().flat_map(|arg| {
204 quote! { &(#arg), } 204 quote! { &(#arg), }
205 }.token_trees).collect::<Vec<_>>(); 205 }.token_trees);
206 206
207 let expanded = quote! { 207 let expanded = quote! {
208 { { (##arg_tts); } } 208 { { (##arg_tts); } }
@@ -254,7 +254,7 @@ fn format_args_expand(
254 let _format_string = args.remove(0); 254 let _format_string = args.remove(0);
255 let arg_tts = args.into_iter().flat_map(|arg| { 255 let arg_tts = args.into_iter().flat_map(|arg| {
256 quote! { std::fmt::ArgumentV1::new(&(#arg), std::fmt::Display::fmt), } 256 quote! { std::fmt::ArgumentV1::new(&(#arg), std::fmt::Display::fmt), }
257 }.token_trees).collect::<Vec<_>>(); 257 }.token_trees);
258 let expanded = quote! { 258 let expanded = quote! {
259 std::fmt::Arguments::new_v1(&[], &[##arg_tts]) 259 std::fmt::Arguments::new_v1(&[], &[##arg_tts])
260 }; 260 };