Skip to content

Commit

Permalink
Merge pull request #609 from FirelightFlagboy/patch-1
Browse files Browse the repository at this point in the history
Improve recursive call macros hygiene
  • Loading branch information
sunng87 authored Sep 23, 2023
2 parents 35fe7c7 + 768db92 commit 7cb1edd
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 7cb1edd

Please sign in to comment.