mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 16:50:10 +00:00
fix(command_parser): use correct invalid_flags variable when constructing that error
This commit is contained in:
parent
a5576ad225
commit
3e65d74bc4
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ pub fn parse_command(
|
||||||
if invalid_flags.is_empty().not() {
|
if invalid_flags.is_empty().not() {
|
||||||
let mut error = format!(
|
let mut error = format!(
|
||||||
"Flag{} ",
|
"Flag{} ",
|
||||||
(misplaced_flags.len() > 1).then_some("s").unwrap_or("")
|
(invalid_flags.len() > 1).then_some("s").unwrap_or("")
|
||||||
);
|
);
|
||||||
for (idx, matched_flag) in invalid_flags.iter().enumerate() {
|
for (idx, matched_flag) in invalid_flags.iter().enumerate() {
|
||||||
write!(&mut error, "`-{}`", matched_flag.name).expect("oom");
|
write!(&mut error, "`-{}`", matched_flag.name).expect("oom");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue