From e1f5dfe50c9ae1a1fac3321988bd843d498bc569 Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Wed, 21 Jun 2023 18:26:28 +0800 Subject: [PATCH] Fix value parser for `Option` --- src/command/mod.rs | 5 ++--- src/command/test.rs | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/command/mod.rs b/src/command/mod.rs index c3e4edf..9912352 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -18,7 +18,6 @@ use self::publish::{access::Access, publish}; use self::test::{Test, TestOptions}; use crate::install::InstallMode; use anyhow::Result; -use clap::builder::ValueParser; use clap::Subcommand; use log::info; use std::path::PathBuf; @@ -33,7 +32,7 @@ pub enum Command { /// 🍱 create a tar of your npm package but don't publish! Pack { /// The path to the Rust crate. If not set, searches up the path from the current directory. - #[clap(value_parser = ValueParser::os_string())] + #[clap()] path: Option, }, @@ -70,7 +69,7 @@ pub enum Command { tag: Option, /// The path to the Rust crate. If not set, searches up the path from the current directory. - #[clap(value_parser = ValueParser::os_string())] + #[clap()] path: Option, }, diff --git a/src/command/test.rs b/src/command/test.rs index 30b0e5f..01ae1e2 100644 --- a/src/command/test.rs +++ b/src/command/test.rs @@ -9,7 +9,6 @@ use crate::manifest; use crate::test::{self, webdriver}; use anyhow::{bail, Result}; use binary_install::Cache; -use clap::builder::ValueParser; use clap::Args; use console::style; use log::info; @@ -32,7 +31,7 @@ pub struct TestOptions { /// copy. pub firefox: bool, - #[clap(long = "geckodriver", value_parser = ValueParser::os_string())] + #[clap(long = "geckodriver")] /// The path to the `geckodriver` WebDriver client for testing in /// Firefox. Implies `--firefox`. pub geckodriver: Option, @@ -44,7 +43,7 @@ pub struct TestOptions { /// copy. pub chrome: bool, - #[clap(long = "chromedriver", value_parser = ValueParser::os_string())] + #[clap(long = "chromedriver")] /// The path to the `chromedriver` WebDriver client for testing in /// Chrome. Implies `--chrome`. pub chromedriver: Option, @@ -56,7 +55,7 @@ pub struct TestOptions { /// download the `safaridriver` WebDriver client for you. pub safari: bool, - #[clap(long = "safaridriver", value_parser = ValueParser::os_string())] + #[clap(long = "safaridriver")] /// The path to the `safaridriver` WebDriver client for testing in /// Safari. Implies `--safari`. pub safaridriver: Option,