setup clippy and make a pass on code

This commit is contained in:
Quentin de Quelen
2020-01-31 10:50:28 +01:00
committed by qdequele
parent ea2a64a504
commit 2143226f04
6 changed files with 14 additions and 12 deletions

View File

@ -64,7 +64,7 @@ pub async fn search_with_url_query(ctx: Request<Data>) -> SResult<Response> {
let attributes_to_crop = schema
.displayed_name()
.iter()
.map(|attr| (attr.to_string(), crop_length))
.map(|attr| ((*attr).to_string(), crop_length))
.collect();
search_builder.attributes_to_crop(attributes_to_crop);
} else {
@ -81,7 +81,7 @@ pub async fn search_with_url_query(ctx: Request<Data>) -> SResult<Response> {
schema
.displayed_name()
.iter()
.map(|s| s.to_string())
.map(|s| (*s).to_string())
.collect()
} else {
attributes_to_highlight