Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clap #1428

Merged
merged 1 commit into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hdrhistogram = { version = "7.2", default-features = false }
quinn = { path = "../quinn" }
rcgen = "0.10.0"
rustls = { version = "0.21.0", default-features = false, features = ["quic"] }
clap = { version = "3.2", features = ["derive"] }
clap = { version = "4", features = ["derive"] }
tokio = { version = "1.0.1", features = ["rt", "sync"] }
tracing = "0.1.10"
tracing-subscriber = { version = "0.3.0", default-features = false, features = ["env-filter", "fmt", "ansi", "time", "local-time"] }
8 changes: 4 additions & 4 deletions bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ pub struct Opt {
pub max_streams: usize,
/// Number of bytes to transmit from server to client
///
/// This can use SI prefixes for sizes. E.g. 1M will transfer 1MiB, 10GiB
/// This can use SI prefixes for sizes. E.g. 1M will transfer 1MiB, 10G
/// will transfer 10GiB.
#[clap(long, default_value = "1G", parse(try_from_str = parse_byte_size))]
#[clap(long, default_value = "1G", value_parser = parse_byte_size)]
pub download_size: u64,
/// Number of bytes to transmit from client to server
///
/// This can use SI prefixes for sizes. E.g. 1M will transfer 1MiB, 10GiB
/// This can use SI prefixes for sizes. E.g. 1M will transfer 1MiB, 10G
/// will transfer 10GiB.
#[clap(long, default_value = "0", parse(try_from_str = parse_byte_size))]
#[clap(long, default_value = "0", value_parser = parse_byte_size)]
pub upload_size: u64,
/// Show connection stats the at the end of the benchmark
#[clap(long = "stats")]
Expand Down
2 changes: 1 addition & 1 deletion perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
socket2 = "0.5"
webpki = "0.22"
clap = { version = "3.2", features = ["derive"] }
clap = { version = "4", features = ["derive"] }
tokio = { version = "1.0.1", features = ["rt", "macros", "signal", "net", "sync"] }
tracing = "0.1.10"
tracing-subscriber = { version = "0.3.0", default-features = false, features = ["env-filter", "fmt", "ansi", "time", "local-time"] }
Expand Down
4 changes: 2 additions & 2 deletions perf/src/bin/perf_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ struct Opt {
#[clap(long = "listen", default_value = "[::]:4433")]
listen: SocketAddr,
/// TLS private key in DER format
#[clap(parse(from_os_str), short = 'k', long = "key", requires = "cert")]
#[clap(short = 'k', long = "key", requires = "cert")]
key: Option<PathBuf>,
/// TLS certificate in PEM format
#[clap(parse(from_os_str), short = 'c', long = "cert", requires = "key")]
#[clap(short = 'c', long = "cert", requires = "key")]
cert: Option<PathBuf>,
/// Send buffer size in bytes
#[clap(long, default_value = "2097152")]
Expand Down
2 changes: 1 addition & 1 deletion quinn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ directories-next = "2"
rand = "0.8"
rcgen = "0.10.0"
rustls-pemfile = "1.0.0"
clap = { version = "3.2", features = ["derive"] }
clap = { version = "4", features = ["derive"] }
tokio = { version = "1.28.1", features = ["rt", "rt-multi-thread", "time", "macros", "sync"] }
tracing-subscriber = { version = "0.3.0", default-features = false, features = ["env-filter", "fmt", "ansi", "time", "local-time"] }
tracing-futures = { version = "0.2.0", default-features = false, features = ["std-future"] }
Expand Down
2 changes: 1 addition & 1 deletion quinn/examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Opt {
host: Option<String>,

/// Custom certificate authority to trust, in DER format
#[clap(parse(from_os_str), long = "ca")]
#[clap(long = "ca")]
ca: Option<PathBuf>,

/// Simulate NAT rebinding after connecting
Expand Down
5 changes: 2 additions & 3 deletions quinn/examples/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ struct Opt {
#[clap(long = "keylog")]
keylog: bool,
/// directory to serve files from
#[clap(parse(from_os_str))]
root: PathBuf,
/// TLS private key in PEM format
#[clap(parse(from_os_str), short = 'k', long = "key", requires = "cert")]
#[clap(short = 'k', long = "key", requires = "cert")]
key: Option<PathBuf>,
/// TLS certificate in PEM format
#[clap(parse(from_os_str), short = 'c', long = "cert", requires = "key")]
#[clap(short = 'c', long = "cert", requires = "key")]
cert: Option<PathBuf>,
/// Enable stateless retries
#[clap(long = "stateless-retry")]
Expand Down