Use 'into()' in handlebars templates tests.

This commit is contained in:
Sergio Benitez 2017-11-17 12:25:33 -08:00
parent f87b46d6c5
commit bbad1a11ec
1 changed files with 2 additions and 2 deletions

View File

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