Skip to content

Commit 2ae8fc7

Browse files
GabrielMajerinicholasbishop
authored andcommitted
Fix errors due to deprecations in the clap API
1 parent 6f5b427 commit 2ae8fc7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

xtask/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ publish = false
77
[dependencies]
88
anyhow = "1.0.51"
99
cfg-if = "1.0.0"
10-
clap = { version = "~3.1", features = ["derive"] }
10+
clap = { version = "3.2.1", features = ["derive"] }
1111
# The latest fatfs release (0.3.5) is old, use git instead to pick up some fixes.
1212
fatfs = { git = "https://github.com/rafalh/rust-fatfs.git", rev = "87fc1ed5074a32b4e0344fcdde77359ef9e75432" }
1313
fs-err = "2.6.0"

xtask/src/opt.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::path::PathBuf;
99
#[derive(Debug, Parser)]
1010
pub struct TargetOpt {
1111
/// UEFI target to build for.
12-
#[clap(long, default_value_t)]
12+
#[clap(long, action, default_value_t)]
1313
pub target: UefiArch,
1414
}
1515

@@ -24,7 +24,7 @@ impl Deref for TargetOpt {
2424
#[derive(Debug, Parser)]
2525
pub struct ToolchainOpt {
2626
/// Rust toolchain to use, e.g. "nightly-2022-02-24".
27-
#[clap(long)]
27+
#[clap(long, action)]
2828
toolchain: Option<String>,
2929
}
3030

@@ -40,14 +40,14 @@ impl ToolchainOpt {
4040
#[derive(Debug, Parser)]
4141
pub struct BuildModeOpt {
4242
/// Build in release mode.
43-
#[clap(long)]
43+
#[clap(long, action)]
4444
pub release: bool,
4545
}
4646

4747
#[derive(Debug, Parser)]
4848
pub struct WarningOpt {
4949
/// Treat warnings as errors.
50-
#[clap(long)]
50+
#[clap(long, action)]
5151
pub warnings_as_errors: bool,
5252
}
5353

@@ -102,7 +102,7 @@ pub struct DocOpt {
102102
pub toolchain: ToolchainOpt,
103103

104104
/// Open the docs in a browser.
105-
#[clap(long)]
105+
#[clap(long, action)]
106106
pub open: bool,
107107

108108
#[clap(flatten)]
@@ -129,19 +129,19 @@ pub struct QemuOpt {
129129
pub build_mode: BuildModeOpt,
130130

131131
/// Disable hardware accelerated virtualization support in QEMU.
132-
#[clap(long)]
132+
#[clap(long, action)]
133133
pub disable_kvm: bool,
134134

135135
/// Disable some tests that don't work in the CI.
136-
#[clap(long)]
136+
#[clap(long, action)]
137137
pub ci: bool,
138138

139139
/// Run QEMU without a GUI.
140-
#[clap(long)]
140+
#[clap(long, action)]
141141
pub headless: bool,
142142

143143
/// Directory in which to look for OVMF files.
144-
#[clap(long)]
144+
#[clap(long, action)]
145145
pub ovmf_dir: Option<PathBuf>,
146146
}
147147

0 commit comments

Comments
 (0)