Reduce turbofish usage

Should make the code a little bit easier to read.
This commit is contained in:
Jonas Platte 2021-10-13 11:51:30 +02:00
parent 1c4d9af586
commit f2ef5677e0
No known key found for this signature in database
GPG key ID: CC154DE0E30B7C67
23 changed files with 331 additions and 387 deletions

View file

@ -74,7 +74,7 @@ pub async fn search_events_route(
}
}
let results = results
let results: Vec<_> = results
.iter()
.map(|result| {
Ok::<_, Error>(SearchResult {
@ -95,7 +95,7 @@ pub async fn search_events_route(
.filter_map(|r| r.ok())
.skip(skip)
.take(limit)
.collect::<Vec<_>>();
.collect();
let next_batch = if results.len() < limit as usize {
None
@ -114,7 +114,7 @@ pub async fn search_events_route(
.search_term
.split_terminator(|c: char| !c.is_alphanumeric())
.map(str::to_lowercase)
.collect::<Vec<_>>(),
.collect(),
},
})
.into())