fix: parsing mixed-case language codes like zh-CN

This commit is contained in:
ThetaDev 2025-01-18 06:59:43 +01:00
parent af7dc10163
commit 9c73ed4b30
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6

View file

@ -898,7 +898,7 @@ async fn run() -> anyhow::Result<()> {
.reporter(Box::new(FileReporter::new("rustypipe_reports")));
}
if let Some(lang) = cli.lang {
rp = rp.lang(Language::from_str(&lang.to_ascii_lowercase()).expect("invalid language"));
rp = rp.lang(Language::from_str(&lang).expect("invalid language"));
}
if let Some(country) = cli.country {
rp = rp.country(Country::from_str(&country.to_ascii_uppercase()).expect("invalid country"));