Skip to content

Commit ab4989c

Browse files
authored
examples: Use typed default value clap config (#634)
1 parent 347c855 commit ab4989c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/axum-key-value-store/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use tower_http::{
2525
#[derive(Debug, Parser)]
2626
struct Config {
2727
/// The port to listen on
28-
#[arg(short = 'p', long, default_value = "3000")]
28+
#[arg(short = 'p', long, default_value_t = 3000)]
2929
port: u16,
3030
}
3131

examples/tonic-key-value-store/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mod proto {
4343
#[derive(Debug, Parser)]
4444
struct Config {
4545
/// The port to listen on
46-
#[arg(short = 'p', long, default_value = "3000")]
46+
#[arg(short = 'p', long, default_value_t = 3000)]
4747
port: u16,
4848

4949
#[command(subcommand)]

examples/warp-key-value-store/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use warp::{Filter, Rejection, Reply};
2626
#[derive(Debug, Parser)]
2727
struct Config {
2828
/// The port to listen on
29-
#[arg(short = 'p', long, default_value = "3000")]
29+
#[arg(short = 'p', long, default_value_t = 3000)]
3030
port: u16,
3131
}
3232

0 commit comments

Comments
 (0)