vhost_user_*: mark --*-backend as required
I don't think the min_values(1) was doing anything, since takes_value(true) was already set, and after this change I still get an error if I try to supply the argument with no value. But the unwrap below would fail if the argument wasn't supplied at all. By setting required(true) we get a nice message from clap instead. Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
parent
3dff598fa2
commit
deb4ad5e23
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ fn main() {
|
|||
.long("block-backend")
|
||||
.help(vhost_user_block::SYNTAX)
|
||||
.takes_value(true)
|
||||
.min_values(1),
|
||||
.required(true),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ fn main() {
|
|||
.long("net-backend")
|
||||
.help(vhost_user_net::SYNTAX)
|
||||
.takes_value(true)
|
||||
.min_values(1),
|
||||
.required(true),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue