Skip to content

Commit 745cd13

Browse files
authored
Upgrade dep clap to 3.0.0-rc.0 (#113)
1 parent 06db954 commit 745cd13

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

crates/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ categories = ["api-bindings", "command-line-interface"]
1313
[dependencies]
1414
ext-php-rs = { version = ">=0.7.1", path = "../../" }
1515

16-
clap = "3.0.0-beta.5"
16+
clap = { version = "3.0.0-rc.0", features = ["derive"] }
1717
anyhow = "1"
1818
dialoguer = "0.9"
1919
libloading = "0.7"

crates/cli/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ macro_rules! stub_symbols {
3737
}
3838

3939
/// Result type returned from the [`run`] function.
40-
pub type Result = anyhow::Result<()>;
40+
pub type CrateResult = AResult<()>;
4141

4242
/// Runs the CLI application. Returns nothing in a result on success.
43-
pub fn run() -> Result {
43+
pub fn run() -> CrateResult {
4444
let mut args: Vec<_> = std::env::args().collect();
4545

4646
// When called as a cargo subcommand, the second argument given will be the
@@ -150,7 +150,7 @@ struct Stubs {
150150
}
151151

152152
impl Args {
153-
pub fn handle(self) -> Result {
153+
pub fn handle(self) -> CrateResult {
154154
match self {
155155
Args::Install(install) => install.handle(),
156156
Args::Remove(remove) => remove.handle(),
@@ -160,7 +160,7 @@ impl Args {
160160
}
161161

162162
impl Install {
163-
pub fn handle(self) -> Result {
163+
pub fn handle(self) -> CrateResult {
164164
let artifact = find_ext(&self.manifest)?;
165165
let ext_path = build_ext(&artifact, self.release)?;
166166

@@ -230,7 +230,7 @@ impl Install {
230230
}
231231

232232
impl Remove {
233-
pub fn handle(self) -> Result {
233+
pub fn handle(self) -> CrateResult {
234234
use std::env::consts;
235235

236236
let artifact = find_ext(&self.manifest)?;
@@ -296,7 +296,7 @@ impl Remove {
296296
}
297297

298298
impl Stubs {
299-
pub fn handle(self) -> Result {
299+
pub fn handle(self) -> CrateResult {
300300
let ext_path = if let Some(ext_path) = self.ext {
301301
ext_path
302302
} else {

crates/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ macro_rules! bind {
77

88
include!("../allowed_bindings.rs");
99

10-
fn main() -> cargo_php::Result {
10+
fn main() -> cargo_php::CrateResult {
1111
cargo_php::run()
1212
}

0 commit comments

Comments
 (0)