diff --git a/Cargo.lock b/Cargo.lock index 489e74a..bf2b8c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -366,11 +366,26 @@ dependencies = [ "bitflags", "strsim 0.8.0", "term_size", - "textwrap", + "textwrap 0.11.0", "unicode-width", "vec_map", ] +[[package]] +name = "clap" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d17bf219fcd37199b9a29e00ba65dfb8cd5b2688b7297ec14ff829c40ac50ca9" +dependencies = [ + "atty", + "bitflags", + "indexmap", + "os_str_bytes", + "strsim 0.10.0", + "termcolor", + "textwrap 0.14.2", +] + [[package]] name = "clipboard" version = "0.5.0" @@ -1721,7 +1736,7 @@ name = "ncspot" version = "0.9.3" dependencies = [ "chrono", - "clap", + "clap 3.0.0", "clipboard", "crossbeam-channel", "cursive", @@ -2217,6 +2232,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "os_str_bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +dependencies = [ + "memchr 2.4.1", +] + [[package]] name = "owning_ref" version = "0.4.1" @@ -3202,13 +3226,19 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "structopt" version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" dependencies = [ - "clap", + "clap 2.34.0", "lazy_static 1.4.0", "structopt-derive", ] @@ -3353,6 +3383,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" + [[package]] name = "thiserror" version = "1.0.30" diff --git a/Cargo.toml b/Cargo.toml index b65e34d..9c2d608 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ edition = "2021" maintenance = { status = "actively-developed" } [dependencies] -clap = "2.33.0" +clap = "3.0.0" chrono = "0.4" reqwest = { version = "0.11", features = ["blocking", "json"] } crossbeam-channel = "0.5" diff --git a/src/main.rs b/src/main.rs index 9d1de68..c402a50 100644 --- a/src/main.rs +++ b/src/main.rs @@ -106,24 +106,24 @@ async fn main() -> Result<(), String> { .about("cross-platform ncurses Spotify client") .after_help(&*backends) .arg( - Arg::with_name("debug") - .short("d") + Arg::new("debug") + .short('d') .long("debug") .value_name("FILE") .help("Enable debug logging to the specified file") .takes_value(true), ) .arg( - Arg::with_name("basepath") - .short("b") + Arg::new("basepath") + .short('b') .long("basepath") .value_name("PATH") .help("custom basepath to config/cache files") .takes_value(true), ) .arg( - Arg::with_name("config") - .short("c") + Arg::new("config") + .short('c') .long("config") .value_name("FILE") .help("Filename of config file in basepath")