1
Fork 0
mirror of https://github.com/Steffo99/patched-porobot.git synced 2025-01-03 15:34:18 +00:00

Require a impl Iterator instead of a Vec in create_cardindex_from_dd_latest

This commit is contained in:
Steffo 2023-03-24 13:24:29 +01:00
parent e6fc162578
commit 1c33f250bd
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -155,7 +155,7 @@ pub fn create_cardindex_from_wd() -> card::CardIndex {
/// Create a [`card::CardIndex`] from the latest known data in Data Dragon.
///
/// This function tries to load data from `https://dd.b.pvp.net/latest`.
pub async fn create_cardindex_from_dd_latest(locale: &str, known_set_codes: &Vec<String>) -> card::CardIndex {
pub async fn create_cardindex_from_dd_latest(locale: &str, known_set_codes: impl Iterator<Item = &str>) -> card::CardIndex {
let client = reqwest::Client::new();
let mut index = card::CardIndex::new();