Skip to content

Commit

Permalink
fix generics ordering
Browse files Browse the repository at this point in the history
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
  • Loading branch information
yoshuawuyts committed Jun 29, 2019
1 parent ab084f4 commit b014d17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions async-log-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ pub fn instrument(_attr: TokenStream, item: TokenStream) -> TokenStream {
.iter()
.enumerate()
.map(|(i, _arg)| {
let mut string = format!(", arg_{}", i);
string.push_str("={}");
let mut string = format!(", arg_{:?}", i);
string.push_str("={:?}");
string
})
.collect();

let result = quote! {
#(#attrs)*
#vis #constness #unsafety #asyncness #abi fn #generics #name(#(#inputs)*) #output {
#vis #constness #unsafety #asyncness #abi fn #name #generics (#(#inputs)*) #output {
let __name = format!("{}#{}", file!(), stringify!(#name));
let __args = format!("{}{}", __name, format_args!(#names, #(#args)*));
async_log::span!(__args, {
Expand Down

0 comments on commit b014d17

Please # to comment.