From 70fa17dde0801227af58c16141cebdae18d3af7a Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 11 Jun 2024 21:14:59 -0700 Subject: [PATCH] enable clap's wrap_help feature This makes the output easier to read. --- Cargo.lock | 40 ++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 0ec85d7c..66d91f80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -449,6 +449,7 @@ checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstyle", "clap_lex", + "terminal_size", ] [[package]] @@ -650,6 +651,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "fallible-iterator" version = "0.3.0" @@ -1391,6 +1402,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "lock_api" version = "0.4.12" @@ -2360,6 +2377,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" version = "0.21.12" @@ -2787,6 +2817,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "thiserror" version = "1.0.61" diff --git a/Cargo.toml b/Cargo.toml index c2da8680..4e71bdb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,7 +94,7 @@ axum-extra = { version = "0.9.3", features = ["typed-header"] } axum-server = { version = "0.6.0", features = ["tls-rustls"] } base64 = "0.22.1" bytes = "1.6.0" -clap = { version = "4.5.4", default-features = false, features = ["std", "derive", "help", "usage", "error-context", "string"] } +clap = { version = "4.5.4", default-features = false, features = ["std", "derive", "help", "usage", "error-context", "string", "wrap_help"] } futures-util = { version = "0.3.30", default-features = false } hmac = "0.12.1" html-escape = "0.2.13"