aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remind/parser.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2018-06-16 15:35:49 +0200
committerJokler <jokler.contact@gmail.com>2018-06-16 15:35:49 +0200
commit9baade2a5d9fec54fe4d88216fbdb91c154ad348 (patch)
treee4bee7605f2c2738574ad7d7a671c8b843bf53b5 /src/plugins/remind/parser.rs
parent768fcc68af3cc57f52ac7117cbf325479836159a (diff)
downloadfrippy-9baade2a5d9fec54fe4d88216fbdb91c154ad348.tar.gz
frippy-9baade2a5d9fec54fe4d88216fbdb91c154ad348.zip
Fix clippy warnings
Diffstat (limited to 'src/plugins/remind/parser.rs')
-rw-r--r--src/plugins/remind/parser.rs50
1 files changed, 20 insertions, 30 deletions
diff --git a/src/plugins/remind/parser.rs b/src/plugins/remind/parser.rs
index eb39d04..d6e8574 100644
--- a/src/plugins/remind/parser.rs
+++ b/src/plugins/remind/parser.rs
@@ -99,36 +99,26 @@ impl CommandParser {
use self::ParseState::*;
let string = Some(string);
match state {
- &On if self.on_date.is_none() => {
- return Ok(CommandParser {
- on_date: string,
- ..self
- })
- }
- &At if self.at_time.is_none() => {
- return Ok(CommandParser {
- at_time: string,
- ..self
- })
- }
- &In if self.in_duration.is_none() => {
- return Ok(CommandParser {
- in_duration: string,
- ..self
- })
- }
- &Msg if self.message.is_none() => {
- return Ok(CommandParser {
- message: string,
- ..self
- })
- }
- &Every if self.every_time.is_none() => {
- return Ok(CommandParser {
- every_time: string,
- ..self
- })
- }
+ On if self.on_date.is_none() => Ok(CommandParser {
+ on_date: string,
+ ..self
+ }),
+ At if self.at_time.is_none() => Ok(CommandParser {
+ at_time: string,
+ ..self
+ }),
+ In if self.in_duration.is_none() => Ok(CommandParser {
+ in_duration: string,
+ ..self
+ }),
+ Msg if self.message.is_none() => Ok(CommandParser {
+ message: string,
+ ..self
+ }),
+ Every if self.every_time.is_none() => Ok(CommandParser {
+ every_time: string,
+ ..self
+ }),
_ => Err(ErrorKind::MissingMessage.into()),
}
}