Fix error message.

This commit is contained in:
Condorra 2023-01-15 13:53:40 +11:00
parent cf8ceb1351
commit 8b0a1490db

View File

@ -8,7 +8,7 @@ pub struct Verb;
impl UserVerb for Verb {
async fn handle(self: &Self, ctx: &mut VerbContext, _verb: &str, remaining: &str) -> UResult<()> {
let (username, password) = match remaining.split_whitespace().collect::<Vec<&str>>()[..] {
[] => user_error("Too few options to login".to_owned())?,
[] | [_] => user_error("Too few options to login".to_owned())?,
[username, password] => (username, password),
_ => user_error("Too many options to login".to_owned())?,
};