This commit is contained in:
Edward Shen 2019-12-21 14:21:13 -05:00
parent 64aec75659
commit be505480c5
Signed by: edward
GPG key ID: F350507060ED6C90
2 changed files with 149 additions and 145 deletions

2
rustfmt.toml Normal file
View file

@ -0,0 +1,2 @@
tab_spaces = 2
use_field_init_shorthand = true

View file

@ -54,7 +54,8 @@ fn hop(data: Data<Arc<RwLock<State>>>, query: Query<SearchQuery>) -> impl Respon
Some(template) => HttpResponse::Found()
.header(
header::LOCATION,
data.renderer
data
.renderer
.render_template(template, &template_args)
.unwrap(),
)
@ -72,7 +73,8 @@ fn hop(data: Data<Arc<RwLock<State>>>, query: Query<SearchQuery>) -> impl Respon
HttpResponse::Found()
.header(
header::LOCATION,
data.renderer
data
.renderer
.render_template(data.routes.get(route).unwrap(), &template_args)
.unwrap(),
)