Skip to content

Commit

Permalink
Fix compile error in handlebars_helpers tests
Browse files Browse the repository at this point in the history
When testing without the `scripting` feature, compilation would fail
because a `Configuration` was constructed assuming the `helpers` field
always exists, but it only exists when `scripting` is enabled.
  • Loading branch information
Diomendius committed Apr 12, 2024
1 parent a64e654 commit 7f942c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/handlebars_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ mod test {
let mut config = Configuration {
files: Files::new(),
variables: maplit::btreemap! { "foo".into() => 2.into() },
#[cfg(feature = "scripting")]
helpers: Helpers::new(),
packages: maplit::btreemap! { "default".into() => true, "disabled".into() => false },
recurse: true,
Expand All @@ -383,6 +384,7 @@ mod test {
let mut config = Configuration {
files: Files::new(),
variables: Variables::new(),
#[cfg(feature = "scripting")]
helpers: Helpers::new(),
packages: BTreeMap::new(),
recurse: true,
Expand Down

0 comments on commit 7f942c1

Please sign in to comment.