Avoid early return

This commit is contained in:
Benjamin Sago 2017-08-05 11:55:41 +01:00
parent 06157fdedd
commit f86c49cd4a

View File

@ -275,16 +275,15 @@ impl TimeTypes {
if let Some(word) = possible_word {
if modified {
return Err(Misfire::Useless(&flags::MODIFIED, true, &flags::TIME));
Err(Misfire::Useless(&flags::MODIFIED, true, &flags::TIME))
}
else if created {
return Err(Misfire::Useless(&flags::CREATED, true, &flags::TIME));
Err(Misfire::Useless(&flags::CREATED, true, &flags::TIME))
}
else if accessed {
return Err(Misfire::Useless(&flags::ACCESSED, true, &flags::TIME));
Err(Misfire::Useless(&flags::ACCESSED, true, &flags::TIME))
}
if word == "mod" || word == "modified" {
else if word == "mod" || word == "modified" {
Ok(TimeTypes { accessed: false, modified: true, created: false })
}
else if word == "acc" || word == "accessed" {