mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 01:02:01 +03:00
Refactor Yahoo Finance client to fetch symbols concurrently and fix clippy warnings
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
fb03dc8d14
commit
cd5da736e0
1 changed files with 2 additions and 4 deletions
|
|
@ -319,10 +319,8 @@ async fn fetch_market_data(
|
|||
|
||||
let mut prices = std::collections::HashMap::new();
|
||||
let results = futures::future::join_all(futures_reqs).await;
|
||||
for res in results {
|
||||
if let Some((sym, price)) = res {
|
||||
prices.insert(sym, price);
|
||||
}
|
||||
for (sym, price) in results.into_iter().flatten() {
|
||||
prices.insert(sym, price);
|
||||
}
|
||||
|
||||
if !prices.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue