ch-remote, main, vhost_user: Fix deprecated APIs for clap v3.1.0

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2022-02-16 17:23:45 -08:00
committed by dependabot[bot]
parent 5fd49927f2
commit 0ee8ead53d
4 changed files with 43 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ extern crate clap;
#[macro_use]
extern crate event_monitor;
use clap::{App, Arg, ArgGroup, ArgMatches};
use clap::{Arg, ArgGroup, ArgMatches, Command};
use libc::EFD_NONBLOCK;
use log::LevelFilter;
use option_parser::OptionParser;
@@ -129,8 +129,8 @@ fn create_app<'a>(
default_vcpus: &'a str,
default_memory: &'a str,
default_rng: &'a str,
) -> App<'a> {
let app = App::new("cloud-hypervisor")
) -> Command<'a> {
let app = Command::new("cloud-hypervisor")
// 'BUILT_VERSION' is set by the build script 'build.rs' at
// compile time
.version(env!("BUILT_VERSION"))