Skip to content

Commit

Permalink
geocode: use to_ascii_lowercase when normalizing ISO codes
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Sep 2, 2023
1 parent d32ce06 commit 6bc4d72
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cmd/geocode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<String>>();
let languages_vec: Vec<&str> = languages_string_vec
.iter()
Expand Down Expand Up @@ -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::<Vec<String>>(),
)
} else {
Expand Down

0 comments on commit 6bc4d72

Please sign in to comment.