Skip to content

Commit

Permalink
fix: convert input to lowercase during arg parse
Browse files Browse the repository at this point in the history
  • Loading branch information
damaredayo committed Sep 3, 2024
1 parent 103bf19 commit ef1cc18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bathbot/src/commands/osu/simulate/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl SimulateArg {
pub fn parse(input: &str) -> Result<Self, ParseError<'_>> {
let (rest, key_opt) = parse_key(input).map_err(|_| ParseError::Nom(input))?;

match key_opt {
match key_opt.map(str::to_lowercase).as_deref() {
None => parse_any(rest),
Some("acc" | "a" | "accuracy") => parse_acc(rest).map(SimulateArg::Acc),
Some("bpm") => parse_bpm(rest).map(SimulateArg::Bpm),
Expand Down

0 comments on commit ef1cc18

Please sign in to comment.