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