mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-10 04:30:29 +00:00
Match more osu! play mode strings
This commit is contained in:
parent
cafa65581c
commit
cfd848767d
1 changed files with 5 additions and 5 deletions
|
@ -180,11 +180,11 @@ struct ModeArg(Mode);
|
|||
impl FromStr for ModeArg {
|
||||
type Err = String;
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
Ok(ModeArg(match s {
|
||||
"std" => Mode::Std,
|
||||
"taiko" => Mode::Taiko,
|
||||
"catch" => Mode::Catch,
|
||||
"mania" => Mode::Mania,
|
||||
Ok(ModeArg(match &s.to_lowercase()[..] {
|
||||
"osu" | "std" => Mode::Std,
|
||||
"taiko" | "osu!taiko" => Mode::Taiko,
|
||||
"ctb" | "fruits" | "catch" | "osu!ctb" | "osu!catch" => Mode::Catch,
|
||||
"osu!mania" | "mania" => Mode::Mania,
|
||||
_ => return Err(format!("Unknown mode {}", s)),
|
||||
}))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue