diff options
author | Sam Tay <samctay@pm.me> | 2022-09-30 17:59:35 -0700 |
---|---|---|
committer | Sam Tay <samctay@pm.me> | 2022-09-30 17:59:35 -0700 |
commit | 376a65423ab1ee70b536a9d9ecdca0d98696e32f (patch) | |
tree | 64bd0fe8733019349b3e591cd2b2a9af031495d0 | |
parent | 9afb396e19421cc9ccb08edf904e0bf90151d153 (diff) |
Remove unnecessary bindingdevelop
-rw-r--r-- | src/stackexchange/search.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/stackexchange/search.rs b/src/stackexchange/search.rs index 4a0abea..956a97d 100644 --- a/src/stackexchange/search.rs +++ b/src/stackexchange/search.rs @@ -124,10 +124,7 @@ impl Search { futures::stream::iter(question_ids) .map(|(site, ids)| { let api = self.api.clone(); - tokio::spawn(async move { - let api = &api; - api.questions(&site, ids).await - }) + tokio::spawn(async move { api.questions(&site, ids).await }) }) .buffer_unordered(CONCURRENT_REQUESTS_LIMIT) .collect::<Vec<_>>() @@ -149,10 +146,7 @@ impl Search { let api = self.api.clone(); let limit = self.config.limit; let query = self.query.clone(); - tokio::spawn(async move { - let api = &api; - api.search_advanced(&query, &site, limit).await - }) + tokio::spawn(async move { api.search_advanced(&query, &site, limit).await }) }) .buffer_unordered(CONCURRENT_REQUESTS_LIMIT) .collect::<Vec<_>>() |