Reduce turbofish usage
Should make the code a little bit easier to read.
This commit is contained in:
parent
1c4d9af586
commit
f2ef5677e0
23 changed files with 331 additions and 387 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue