Skip to content
Prev Previous commit
Next Next commit
fix compile error on alias'd Results with no explicit Err type arg
  • Loading branch information
mellowagain committed Jul 3, 2023
commit 25138eaa8850fe9187a1dadf7da9d9ae51795a35
9 changes: 6 additions & 3 deletions autometrics-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fn instrument_function(args: &AutometricsArgs, item: ItemFn) -> Result<TokenStre
});
}

quote! { <#(#ts,)*> }
quote! { <#(#ts),*> }
}
_ => quote! {},
};
Expand Down Expand Up @@ -244,7 +244,7 @@ fn instrument_function(args: &AutometricsArgs, item: ItemFn) -> Result<TokenStre
quote! {}
};

Ok(quote! {
let a = quote! {
#(#attrs)*

// Append the metrics documentation to the end of the function's documentation
Expand Down Expand Up @@ -280,7 +280,10 @@ fn instrument_function(args: &AutometricsArgs, item: ItemFn) -> Result<TokenStre

result
}
})
};

//panic!("{}", a);
Ok(a)
}

/// Add autometrics instrumentation to an entire impl block
Expand Down