The arguments can be named on commandline
This commit is contained in:
@@ -27,12 +27,12 @@ async fn publish_departure_data(client: &AsyncClient, data: &straba::NextDepartu
|
|||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(version, about, long_about = None)]
|
#[command(version, about, long_about = None)]
|
||||||
struct Args {
|
struct Args {
|
||||||
#[arg(default_value = "localhost")]
|
#[arg(long, default_value = "localhost")]
|
||||||
broker: String,
|
broker: String,
|
||||||
|
|
||||||
#[arg(default_value_t = 1883)]
|
#[arg(long, default_value_t = 1883)]
|
||||||
port: u16,
|
port: u16,
|
||||||
#[arg(default_value_t = 300)]
|
#[arg(long, default_value_t = 300)]
|
||||||
interval: u32,
|
interval: u32,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user