mirror of
https://github.com/containers/youki
synced 2024-05-18 13:36:14 +02:00
Resolve deprecation warnings from clap
This commit is contained in:
parent
85d6da9ad4
commit
a8dec2f3af
|
@ -211,16 +211,6 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_generate"
|
||||
version = "3.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e1b28c4a802ac3628604fd267cac62aaea74dc61af3410db6b1c44c03b42599"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"clap_complete",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "combine"
|
||||
version = "2.5.2"
|
||||
|
@ -2598,7 +2588,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"chrono",
|
||||
"clap",
|
||||
"clap_generate",
|
||||
"clap_complete",
|
||||
"libcgroups",
|
||||
"libcontainer",
|
||||
"liboci-cli",
|
||||
|
|
|
@ -54,7 +54,7 @@ pub enum CommonCmd {
|
|||
Exec(Exec),
|
||||
List(List),
|
||||
Pause(Pause),
|
||||
#[clap(setting = clap::AppSettings::AllowLeadingHyphen)]
|
||||
#[clap(setting = clap::AppSettings::AllowHyphenValues)]
|
||||
Ps(Ps),
|
||||
Resume(Resume),
|
||||
Run(Run),
|
||||
|
|
|
@ -32,7 +32,7 @@ procfs = "0.12.0"
|
|||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tabwriter = "1"
|
||||
clap_generate = { version = "3.0.0-beta.5" }
|
||||
clap_complete = "3.1.1"
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = "0.6.0"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use anyhow::Result;
|
||||
use clap::{App, Parser};
|
||||
use clap_generate::{generate, Shell};
|
||||
use clap::{Command, Parser};
|
||||
|
||||
use clap_complete::{generate, Shell};
|
||||
use std::io;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
|
@ -10,7 +11,7 @@ pub struct Completion {
|
|||
pub shell: Shell,
|
||||
}
|
||||
|
||||
pub fn completion(args: Completion, app: &mut App) -> Result<()> {
|
||||
pub fn completion(args: Completion, app: &mut Command) -> Result<()> {
|
||||
generate(
|
||||
args.shell,
|
||||
app,
|
||||
|
|
|
@ -82,7 +82,7 @@ fn main() -> Result<()> {
|
|||
pentacle::ensure_sealed().context("failed to seal /proc/self/exe")?;
|
||||
|
||||
let opts = Opts::parse();
|
||||
let mut app = Opts::into_app();
|
||||
let mut app = Opts::command();
|
||||
|
||||
if let Err(e) = crate::logger::init(opts.global.debug, opts.global.log, opts.global.log_format)
|
||||
{
|
||||
|
|
|
@ -430,7 +430,7 @@ checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
|
|||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi",
|
||||
"wasi 0.10.2+wasi-snapshot-preview1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -556,9 +556,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.119"
|
||||
version = "0.2.121"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
|
||||
checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f"
|
||||
|
||||
[[package]]
|
||||
name = "libcgroups"
|
||||
|
@ -664,14 +664,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.8.0"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2"
|
||||
checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
"miow",
|
||||
"ntapi",
|
||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
|
@ -1206,6 +1207,12 @@ version = "0.10.2+wasi-snapshot-preview1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "which"
|
||||
version = "4.2.4"
|
||||
|
|
Loading…
Reference in New Issue