From 009eb93c831cdc176da5d378767b8f8e1e419622 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Wed, 15 Jun 2022 23:31:12 +0200 Subject: [PATCH] build: bump clap crates to v3.2 (#4067) --- Cargo.toml | 2 +- src/context.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b2d7d681..698d6418 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ notify = ["notify-rust"] [dependencies] ansi_term = "0.12.1" chrono = "0.4.19" -clap = { version = "3.1.18", features = ["derive", "cargo", "unicode"] } +clap = { version = "=3.2.4", features = ["derive", "cargo", "unicode", "unstable-v4"] } clap_complete = "3.2.1" dirs-next = "2.0.0" dunce = "1.0.2" diff --git a/src/context.rs b/src/context.rs index 11dd57aa..00415d8d 100644 --- a/src/context.rs +++ b/src/context.rs @@ -606,7 +606,7 @@ pub struct Properties { #[clap(long, value_delimiter = ' ')] pub pipestatus: Option>, /// The width of the current interactive terminal. - #[clap(short = 'w', long, default_value_t=default_width(), parse(try_from_str=parse_width))] + #[clap(short = 'w', long, default_value_t=default_width(), value_parser=parse_width)] terminal_width: usize, /// The path that the prompt should render for. #[clap(short, long)] @@ -622,7 +622,7 @@ pub struct Properties { #[clap(short = 'k', long, default_value = "viins")] pub keymap: String, /// The number of currently running jobs - #[clap(short, long, default_value_t, parse(try_from_str=parse_jobs))] + #[clap(short, long, default_value_t, value_parser=parse_jobs)] pub jobs: i64, }