mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-18 07:29:09 +00:00
Use 'into()' in handlebars templates tests.
This commit is contained in:
parent
f87b46d6c5
commit
bbad1a11ec
@ -44,8 +44,8 @@ fn test_name() {
|
||||
// Check that the /hello/<name> route works.
|
||||
dispatch!(Get, "/hello/Jack", |mut response: LocalResponse| {
|
||||
let context = super::TemplateContext {
|
||||
name: "Jack".to_string(),
|
||||
items: vec!["One", "Two", "Three"].iter().map(|s| s.to_string()).collect()
|
||||
name: "Jack".into(),
|
||||
items: vec!["One".into(), "Two".into(), "Three".into()]
|
||||
};
|
||||
|
||||
let expected = Template::show(TEMPLATE_ROOT, "index", &context).unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user