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()
}),
}
} else {
if parameter.variadic {
} else if parameter.variadic {
let value = Cow::Owned(rest.to_vec().join(" "));
rest = &[];
value
@ -320,7 +319,6 @@ impl<'a> Recipe<'a> {
let value = Cow::Borrowed(rest[0]);
rest = &rest[1..];
value
}
};
argument_map.insert(parameter.name, value);
}