aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_macros')
-rw-r--r--mingling_macros/src/renderer.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/mingling_macros/src/renderer.rs b/mingling_macros/src/renderer.rs
index 89b2188..362a4a4 100644
--- a/mingling_macros/src/renderer.rs
+++ b/mingling_macros/src/renderer.rs
@@ -131,11 +131,14 @@ pub fn renderer_attr(item: TokenStream) -> TokenStream {
// Keep the original function for internal use (without r parameter)
#(#fn_attrs)*
- #vis fn #fn_name(#prev_param: #previous_type) {
+ #vis fn #fn_name(#prev_param: impl Into<#previous_type>) -> ::mingling::RenderResult {
+ let #prev_param = #prev_param.into();
let mut dummy_r = ::mingling::RenderResult::default();
- let r = &mut dummy_r;
- #fn_body
- println!("{}", r.trim());
+ {
+ let r = &mut dummy_r;
+ #fn_body
+ }
+ dummy_r
}
};