Bump clap from 2.34.0 to 3.1.18 (#2824)

* Bump clap from 2.34.0 to 3.1.18

Bumps [clap](https://github.com/clap-rs/clap) from 2.34.0 to 3.1.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.34.0...v3.1.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update taskchampion-sync-server for clap 3.x

* bump MSRV to 1.54 for extended_key_value_attributes required by clap

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
This commit is contained in:
dependabot[bot] 2022-05-30 12:34:55 -04:00 committed by GitHub
parent a1bd08d6d1
commit e842b66e5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 72 deletions

50
Cargo.lock generated
View file

@ -621,7 +621,7 @@ version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b6d248e3ca02f3fbfabcb9284464c596baec223a26d91bbf44a5a62ddb0d900" checksum = "5b6d248e3ca02f3fbfabcb9284464c596baec223a26d91bbf44a5a62ddb0d900"
dependencies = [ dependencies = [
"clap 3.1.18", "clap",
"heck", "heck",
"indexmap", "indexmap",
"log", "log",
@ -672,21 +672,6 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e"
[[package]]
name = "clap"
version = "2.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
dependencies = [
"ansi_term",
"atty",
"bitflags",
"strsim 0.8.0",
"textwrap 0.11.0",
"unicode-width",
"vec_map",
]
[[package]] [[package]]
name = "clap" name = "clap"
version = "3.1.18" version = "3.1.18"
@ -697,9 +682,9 @@ dependencies = [
"bitflags", "bitflags",
"clap_lex", "clap_lex",
"indexmap", "indexmap",
"strsim 0.10.0", "strsim",
"termcolor", "termcolor",
"textwrap 0.15.0", "textwrap",
] ]
[[package]] [[package]]
@ -2134,12 +2119,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
[[package]]
name = "strsim"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.10.0" version = "0.10.0"
@ -2218,7 +2197,7 @@ dependencies = [
"actix-web", "actix-web",
"anyhow", "anyhow",
"chrono", "chrono",
"clap 2.34.0", "clap",
"env_logger", "env_logger",
"futures", "futures",
"log", "log",
@ -2254,15 +2233,6 @@ dependencies = [
"winapi-util", "winapi-util",
] ]
[[package]]
name = "textwrap"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
dependencies = [
"unicode-width",
]
[[package]] [[package]]
name = "textwrap" name = "textwrap"
version = "0.15.0" version = "0.15.0"
@ -2501,12 +2471,6 @@ dependencies = [
"tinyvec", "tinyvec",
] ]
[[package]]
name = "unicode-width"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]] [[package]]
name = "untrusted" name = "untrusted"
version = "0.7.1" version = "0.7.1"
@ -2568,12 +2532,6 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "vec_map"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.4" version = "0.9.4"

View file

@ -15,7 +15,7 @@ thiserror = "1.0"
futures = "^0.3.8" futures = "^0.3.8"
serde = "^1.0.125" serde = "^1.0.125"
serde_json = "^1.0" serde_json = "^1.0"
clap = "^2.33.0" clap = "^3.1.18"
log = "^0.4.17" log = "^0.4.17"
env_logger = "^0.9.0" env_logger = "^0.9.0"
rusqlite = { version = "0.27", features = ["bundled"] } rusqlite = { version = "0.27", features = ["bundled"] }

View file

@ -1,7 +1,7 @@
#![deny(clippy::all)] #![deny(clippy::all)]
use actix_web::{middleware::Logger, App, HttpServer}; use actix_web::{middleware::Logger, App, HttpServer};
use clap::Arg; use clap::{arg, Command};
use taskchampion_sync_server::storage::SqliteStorage; use taskchampion_sync_server::storage::SqliteStorage;
use taskchampion_sync_server::{Server, ServerConfig}; use taskchampion_sync_server::{Server, ServerConfig};
@ -11,45 +11,28 @@ async fn main() -> anyhow::Result<()> {
let defaults = ServerConfig::default(); let defaults = ServerConfig::default();
let default_snapshot_versions = defaults.snapshot_versions.to_string(); let default_snapshot_versions = defaults.snapshot_versions.to_string();
let default_snapshot_days = defaults.snapshot_days.to_string(); let default_snapshot_days = defaults.snapshot_days.to_string();
let matches = clap::App::new("taskchampion-sync-server") let matches = Command::new("taskchampion-sync-server")
.version(env!("CARGO_PKG_VERSION")) .version(env!("CARGO_PKG_VERSION"))
.about("Server for TaskChampion") .about("Server for TaskChampion")
.arg( .arg(
Arg::with_name("port") arg!(-p --port <PORT> "Port on which to serve")
.short("p")
.long("port")
.value_name("PORT")
.help("Port on which to serve") .help("Port on which to serve")
.default_value("8080") .default_value("8080")
.takes_value(true)
.required(true), .required(true),
) )
.arg( .arg(
Arg::with_name("data-dir") arg!(-d --data-dir <DIR> "Directory in which to store data")
.short("d")
.long("data-dir")
.value_name("DIR")
.help("Directory in which to store data")
.default_value("/var/lib/taskchampion-sync-server") .default_value("/var/lib/taskchampion-sync-server")
.takes_value(true) .allow_invalid_utf8(true)
.required(true), .required(true),
) )
.arg( .arg(
Arg::with_name("snapshot-versions") arg!(--snapshot-versions [NUM] "Target number of versions between snapshots")
.long("snapshot-versions") .default_value(&default_snapshot_versions),
.value_name("NUM")
.help("Target number of versions between snapshots")
.default_value(&default_snapshot_versions)
.takes_value(true)
.required(false),
) )
.arg( .arg(
Arg::with_name("snapshot-days") arg!(--snapshot-days [NUM] "Target number of days between snapshots")
.long("snapshot-days")
.value_name("NUM")
.help("Target number of days between snapshots")
.default_value(&default_snapshot_days) .default_value(&default_snapshot_days)
.takes_value(true)
.required(false), .required(false),
) )
.get_matches(); .get_matches();