mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Minor clippy perf fixes
This commit is contained in:
parent
0d863ccea9
commit
e3ce88f6f2
11 changed files with 22 additions and 21 deletions
|
@ -202,7 +202,7 @@ fn assert_expand(
|
|||
|
||||
let arg_tts = args.into_iter().flat_map(|arg| {
|
||||
quote! { &(#arg), }
|
||||
}.token_trees).collect::<Vec<_>>();
|
||||
}.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::<Vec<_>>();
|
||||
}.token_trees);
|
||||
let expanded = quote! {
|
||||
std::fmt::Arguments::new_v1(&[], &[##arg_tts])
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue