api: lowercase lang

This commit is contained in:
Dmitriy Pleshevskiy 2022-05-15 23:27:03 +03:00
parent d15faa1f65
commit 57b3816a44
1 changed files with 3 additions and 3 deletions

View File

@ -29,9 +29,9 @@ impl FromStr for Lang {
type Err = (); type Err = ();
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
match s { match &s.to_lowercase()[..] {
"Rus" | "rus" => Ok(Lang::Rus), "rus" => Ok(Lang::Rus),
"Eng" | "eng" => Ok(Lang::Eng), "eng" => Ok(Lang::Eng),
_ => Err(()), _ => Err(()),
} }
} }