Collapse unnecessary block (#128)
This commit is contained in:
parent
1ac5b4ea42
commit
11c0d349db
16
src/lib.rs
16
src/lib.rs
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user