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

View File

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

View File

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