build: Bump clap from 3.2.22 to 4.0.9

Bumps [clap](https://github.com/clap-rs/clap) from 3.2.22 to 4.0.9.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v3.2.22...v4.0.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Moving to the major version 4 introduced some breaking changes which had
to be handled manually.

Fixes #4709

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2022-10-04 16:52:43 +02:00
committed by Rob Bradford
parent 307cfeba27
commit 89677c3181
13 changed files with 153 additions and 212 deletions

View File

@@ -5,7 +5,7 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2021"
[dependencies]
clap = { version = "3.2.22", features = ["wrap_help","cargo"] }
clap = { version = "4.0.9", features = ["wrap_help","cargo"] }
env_logger = "0.9.1"
epoll = "4.3.1"
libc = "0.2.134"
@@ -19,4 +19,4 @@ vm-memory = "0.9.0"
vmm-sys-util = "0.10.0"
[build-dependencies]
clap = { version = "3.2.22", features = ["cargo"] }
clap = { version = "4.0.9", features = ["cargo"] }

View File

@@ -23,11 +23,11 @@ fn main() {
Arg::new("net-backend")
.long("net-backend")
.help(vhost_user_net::SYNTAX)
.takes_value(true)
.num_args(1)
.required(true),
)
.get_matches();
let backend_command = cmd_arguments.value_of("net-backend").unwrap();
let backend_command = cmd_arguments.get_one::<String>("net-backend").unwrap();
start_net_backend(backend_command);
}