Skip to content

Commit

Permalink
Improve recursive call macros hygiene
Browse files Browse the repository at this point in the history
  • Loading branch information
FirelightFlagboy authored Sep 23, 2023
1 parent 35fe7c7 commit 768db92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ macro_rules! handlebars_helper {
})
.ok_or_else(|| $crate::RenderErrorReason::ParamNotFoundForName(stringify!($struct_name), stringify!($name).to_string()))
.and_then(|x|
handlebars_helper!(@as_json_value x, $tpe$(<$($gen),+>)?)
$crate::handlebars_helper!(@as_json_value x, $tpe$(<$($gen),+>)?)
.ok_or_else(|| $crate::RenderErrorReason::ParamTypeMismatchForName(stringify!($struct_name), stringify!($name).to_string(), stringify!($tpe$(<$($gen),+>)?).to_string()).into())
)?;
param_idx += 1;
Expand All @@ -79,7 +79,7 @@ macro_rules! handlebars_helper {
let $hash_name = h.hash_get(stringify!($hash_name))
.map(|x| x.value())
.map(|x|
handlebars_helper!(@as_json_value x, $hash_tpe)
$crate::handlebars_helper!(@as_json_value x, $hash_tpe)
.ok_or_else(|| $crate::RenderErrorReason::HashTypeMismatchForName(
stringify!($struct_name), stringify!($hash_name).to_string(), stringify!($hash_tpe).to_string()
))
Expand Down

0 comments on commit 768db92

Please sign in to comment.