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

This commit is contained in:
ThetaDev 2025-01-18 06:59:43 +01:00
parent b78adfcbc1
commit 961c8b0c31

View file

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