Collapse unnecessary block (#128)

This commit is contained in:
Casey Rodarmor 2016-11-18 07:07:20 -08:00 committed by GitHub
parent 1ac5b4ea42
commit 11c0d349db

View File

@ -311,8 +311,7 @@ impl<'a> Recipe<'a> {
message: "missing parameter without default".to_string() message: "missing parameter without default".to_string()
}), }),
} }
} else { } else if parameter.variadic {
if parameter.variadic {
let value = Cow::Owned(rest.to_vec().join(" ")); let value = Cow::Owned(rest.to_vec().join(" "));
rest = &[]; rest = &[];
value value
@ -320,7 +319,6 @@ impl<'a> Recipe<'a> {
let value = Cow::Borrowed(rest[0]); let value = Cow::Borrowed(rest[0]);
rest = &rest[1..]; rest = &rest[1..];
value value
}
}; };
argument_map.insert(parameter.name, value); argument_map.insert(parameter.name, value);
} }