Update 'handlebars' to 4.0.

This commit is contained in:
Ning Sun 2021-06-10 10:29:24 +08:00 committed by Sergio Benitez
parent f38cbea898
commit 831ffc6c09
4 changed files with 4 additions and 6 deletions

View File

@ -32,7 +32,7 @@ optional = true
[dependencies.handlebars_]
package = "handlebars"
version = "3.0"
version = "4.1"
optional = true
[package.metadata.docs.rs]

View File

@ -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();

View File

@ -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",
})
}
@ -62,6 +60,6 @@ pub fn customize(hbs: &mut Handlebars) {
</section>
{{/inline}}
{{~> (parent)~}}
{{> hbs/layout}}
"#).expect("valid HBS template");
}

View File

@ -16,4 +16,4 @@
</section>
{{/inline}}
{{~> (parent)~}}
{{> hbs/layout}}