diff --git a/src/cmd/geocode.rs b/src/cmd/geocode.rs index 10a4ffc39..51793c7da 100644 --- a/src/cmd/geocode.rs +++ b/src/cmd/geocode.rs @@ -354,7 +354,7 @@ async fn geocode_main(args: Args) -> CliResult<()> { .flag_languages .to_ascii_lowercase() .split(',') - .map(|s| s.trim().to_string()) + .map(|s| s.trim().to_lowercase()) .collect::>(); let languages_vec: Vec<&str> = languages_string_vec .iter() @@ -515,7 +515,7 @@ async fn geocode_main(args: Args) -> CliResult<()> { Some( country_list .split(',') - .map(|s| s.trim().to_string()) + .map(|s| s.trim().to_lowercase()) .collect::>(), ) } else { diff --git a/tests/test_geocode.rs b/tests/test_geocode.rs index d5f2f952b..73526391c 100644 --- a/tests/test_geocode.rs +++ b/tests/test_geocode.rs @@ -98,7 +98,7 @@ fn geocode_suggest_intl_country_filter() { let mut cmd = wrk.command("geocode"); cmd.arg("suggest") .arg("Location") - .args(["--country", "us"]) + .args(["--country", "US"]) .args(["-f", "%city-admin1-country"]) .arg("data.csv"); @@ -139,7 +139,7 @@ fn geocode_suggest_intl_multi_country_filter() { let mut cmd = wrk.command("geocode"); cmd.arg("suggest") .arg("Location") - .args(["--country", "us,fr,ru"]) + .args(["--country", "us,FR,ru"]) .args(["-f", "%city-admin1-country"]) .arg("data.csv");