Skip to content

Commit

Permalink
Update 'handlebars' to 4.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 authored and SergioBenitez committed Aug 30, 2021
1 parent f38cbea commit 831ffc6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contrib/dyn_templates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ optional = true

[dependencies.handlebars_]
package = "handlebars"
version = "3.0"
version = "4.1"
optional = true

[package.metadata.docs.rs]
Expand Down
2 changes: 1 addition & 1 deletion contrib/dyn_templates/tests/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ mod handlebars_tests {
#[test]
fn test_handlebars_templates() {
const EXPECTED: &'static str
= "Hello _test_!\n\n<main> &lt;script /&gt; hi </main>\nDone.\n\n";
= "Hello _test_!\n<main> &lt;script /&gt; hi </main>\nDone.\n";

let client = Client::debug(rocket()).unwrap();
let mut map = HashMap::new();
Expand Down
4 changes: 1 addition & 3 deletions examples/templating/src/hbs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ pub fn hello(name: &str) -> Template {
title: "Hello",
name: Some(name),
items: vec!["One", "Two", "Three"],
// This special key tells handlebars which template is the parent.
parent: "hbs/layout",
})
}

Expand Down Expand Up @@ -62,6 +60,6 @@ pub fn customize(hbs: &mut Handlebars) {
</section>
{{/inline}}
{{~> (parent)~}}
{{> hbs/layout}}
"#).expect("valid HBS template");
}
2 changes: 1 addition & 1 deletion examples/templating/templates/hbs/index.html.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
</section>

{{/inline}}
{{~> (parent)~}}
{{> hbs/layout}}

0 comments on commit 831ffc6

Please sign in to comment.