diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-05-18 00:06:17 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-05-18 00:06:17 +0200 |
| commit | 1a1a1d47dab61960ac8cfeb0258ca292bc465b52 (patch) | |
| tree | 646824e2dcb226bf9c8b7999f2b3487357fa9466 /src/plugins | |
| parent | 35e795e955c056ce215c73ec96e887eb62751900 (diff) | |
| download | frippy-1a1a1d47dab61960ac8cfeb0258ca292bc465b52.tar.gz frippy-1a1a1d47dab61960ac8cfeb0258ca292bc465b52.zip | |
Remind: Fix target parsing
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/remind/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/remind/parser.rs b/src/plugins/remind/parser.rs index e027aba..eb39d04 100644 --- a/src/plugins/remind/parser.rs +++ b/src/plugins/remind/parser.rs @@ -30,12 +30,12 @@ impl CommandParser { pub fn parse_target(mut tokens: Vec<String>) -> Result<Self, RemindError> { let mut parser = CommandParser::default(); - if let Some(target) = tokens.pop() { - parser.target = target; - } else { + if tokens.is_empty() { Err(ErrorKind::MissingReceiver)?; } + parser.target = tokens.remove(0); + parser.parse_tokens(tokens) } |
