mirror of https://github.com/rwf2/Rocket.git
Update 'handlebars' to 4.0.
This commit is contained in:
parent
f38cbea898
commit
831ffc6c09
|
@ -32,7 +32,7 @@ optional = true
|
|||
|
||||
[dependencies.handlebars_]
|
||||
package = "handlebars"
|
||||
version = "3.0"
|
||||
version = "4.1"
|
||||
optional = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
|
|
|
@ -274,7 +274,7 @@ mod handlebars_tests {
|
|||
#[test]
|
||||
fn test_handlebars_templates() {
|
||||
const EXPECTED: &'static str
|
||||
= "Hello _test_!\n\n<main> <script /> hi </main>\nDone.\n\n";
|
||||
= "Hello _test_!\n<main> <script /> hi </main>\nDone.\n";
|
||||
|
||||
let client = Client::debug(rocket()).unwrap();
|
||||
let mut map = HashMap::new();
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -16,4 +16,4 @@
|
|||
</section>
|
||||
|
||||
{{/inline}}
|
||||
{{~> (parent)~}}
|
||||
{{> hbs/layout}}
|
||||
|
|
Loading…
Reference in New Issue