From 779910b8c45857ed0cda75914d3c212211b00978 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 24 Mar 2023 12:21:04 +0100 Subject: [PATCH] Swap arguments of `create_cardindex_from_dd_latest` --- src/data/setbundle/mod.rs | 2 +- src/discord/main.rs | 2 +- src/telegram/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/setbundle/mod.rs b/src/data/setbundle/mod.rs index 1fe567c..4ed9283 100644 --- a/src/data/setbundle/mod.rs +++ b/src/data/setbundle/mod.rs @@ -148,7 +148,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(known_set_codes: &Vec, locale: &str) -> card::CardIndex { +pub async fn create_cardindex_from_dd_latest(locale: &str, known_set_codes: &Vec) -> card::CardIndex { let client = reqwest::Client::new(); let mut index = card::CardIndex::new(); diff --git a/src/discord/main.rs b/src/discord/main.rs index c117538..83a6a9b 100644 --- a/src/discord/main.rs +++ b/src/discord/main.rs @@ -30,7 +30,7 @@ pub async fn main() { debug!("Created LocalizedGlobalIndexes!"); debug!("Creating CardIndex..."); - let cards = create_cardindex_from_dd_latest(&known_set_codes, &locale).await; + let cards = create_cardindex_from_dd_latest(&locale, &known_set_codes).await; debug!("Created CardIndex!"); debug!("Creating CardSearchEngine..."); diff --git a/src/telegram/main.rs b/src/telegram/main.rs index 0ccca67..a848017 100644 --- a/src/telegram/main.rs +++ b/src/telegram/main.rs @@ -31,7 +31,7 @@ pub async fn main() { debug!("Created LocalizedGlobalIndexes!"); debug!("Creating CardIndex..."); - let cards = create_cardindex_from_dd_latest(&known_set_codes, &locale).await; + let cards = create_cardindex_from_dd_latest(&locale, &known_set_codes).await; debug!("Created CardIndex!"); debug!("Creating CardSearchEngine...");