Skip to content

Commit

Permalink
Upgrade dep clap to 3.0.0-rc.0 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkill authored Dec 9, 2021
1 parent 06db954 commit 745cd13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["api-bindings", "command-line-interface"]
[dependencies]
ext-php-rs = { version = ">=0.7.1", path = "../../" }

clap = "3.0.0-beta.5"
clap = { version = "3.0.0-rc.0", features = ["derive"] }
anyhow = "1"
dialoguer = "0.9"
libloading = "0.7"
Expand Down
12 changes: 6 additions & 6 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ macro_rules! stub_symbols {
}

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

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

// When called as a cargo subcommand, the second argument given will be the
Expand Down Expand Up @@ -150,7 +150,7 @@ struct Stubs {
}

impl Args {
pub fn handle(self) -> Result {
pub fn handle(self) -> CrateResult {
match self {
Args::Install(install) => install.handle(),
Args::Remove(remove) => remove.handle(),
Expand All @@ -160,7 +160,7 @@ impl Args {
}

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

Expand Down Expand Up @@ -230,7 +230,7 @@ impl Install {
}

impl Remove {
pub fn handle(self) -> Result {
pub fn handle(self) -> CrateResult {
use std::env::consts;

let artifact = find_ext(&self.manifest)?;
Expand Down Expand Up @@ -296,7 +296,7 @@ impl Remove {
}

impl Stubs {
pub fn handle(self) -> Result {
pub fn handle(self) -> CrateResult {
let ext_path = if let Some(ext_path) = self.ext {
ext_path
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ macro_rules! bind {

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

fn main() -> cargo_php::Result {
fn main() -> cargo_php::CrateResult {
cargo_php::run()
}

0 comments on commit 745cd13

Please sign in to comment.