From 6bc4d72fe2e15955e9c4d26f81d20df4ed815314 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:29:16 -0400 Subject: [PATCH] `geocode`: use to_ascii_lowercase when normalizing ISO codes --- src/cmd/geocode.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cmd/geocode.rs b/src/cmd/geocode.rs index 51793c7da..fc6426f03 100644 --- a/src/cmd/geocode.rs +++ b/src/cmd/geocode.rs @@ -352,9 +352,8 @@ async fn geocode_main(args: Args) -> CliResult<()> { // setup languages let languages_string_vec = args .flag_languages - .to_ascii_lowercase() .split(',') - .map(|s| s.trim().to_lowercase()) + .map(|s| s.trim().to_ascii_lowercase()) .collect::>(); let languages_vec: Vec<&str> = languages_string_vec .iter() @@ -515,7 +514,7 @@ async fn geocode_main(args: Args) -> CliResult<()> { Some( country_list .split(',') - .map(|s| s.trim().to_lowercase()) + .map(|s| s.trim().to_ascii_lowercase()) .collect::>(), ) } else {