Skip to content

Commit 21b7e98

Browse files
committed
editoast: remove superfluous Default derives in client args
Signed-off-by: Leo Valais <[email protected]>
1 parent 0eaa394 commit 21b7e98

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

editoast/src/client/mod.rs

+3-13
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ pub enum TimetablesCommands {
7979
Export(ExportTimetableArgs),
8080
}
8181

82-
#[derive(Args, Debug, Derivative)]
83-
#[derivative(Default)]
82+
#[derive(Args, Debug)]
8483
#[command(about, long_about = "Import a train schedule given a JSON file")]
8584
pub struct ImportTimetableArgs {
8685
/// The timetable id on which attach the trains to
@@ -90,8 +89,7 @@ pub struct ImportTimetableArgs {
9089
pub path: PathBuf,
9190
}
9291

93-
#[derive(Args, Debug, Derivative)]
94-
#[derivative(Default)]
92+
#[derive(Args, Debug)]
9593
#[command(about, long_about = "Export the train schedules of a given timetable")]
9694
pub struct ExportTimetableArgs {
9795
/// The timetable id on which get the train schedules from
@@ -134,25 +132,19 @@ pub struct MapLayersConfig {
134132
pub max_tiles: u64,
135133
}
136134

137-
#[derive(Args, Debug, Derivative)]
138-
#[derivative(Default)]
135+
#[derive(Args, Debug)]
139136
#[command(about, long_about = "Launch the server")]
140137
pub struct RunserverArgs {
141138
#[command(flatten)]
142139
pub map_layers_config: MapLayersConfig,
143-
#[derivative(Default(value = "8090"))]
144140
#[arg(long, env = "EDITOAST_PORT", default_value_t = 8090)]
145141
pub port: u16,
146-
#[derivative(Default(value = r#""0.0.0.0".into()"#))]
147142
#[arg(long, env = "EDITOAST_ADDRESS", default_value_t = String::from("0.0.0.0"))]
148143
pub address: String,
149-
#[derivative(Default(value = r#""amqp://osrd:[email protected]:5672/%2f".into()"#))]
150144
#[clap(long, env = "OSRD_MQ_URL", default_value_t = String::from("amqp://osrd:[email protected]:5672/%2f"))]
151145
pub mq_url: String,
152-
#[derivative(Default(value = "180"))]
153146
#[clap(long, env = "EDITOAST_CORE_TIMEOUT", default_value_t = 180)]
154147
pub core_timeout: u64,
155-
#[derivative(Default(value = r#""".into()"#))]
156148
#[clap(long, env = "ROOT_PATH", default_value_t = String::new())]
157149
pub root_path: String,
158150
#[clap(long)]
@@ -164,11 +156,9 @@ pub struct RunserverArgs {
164156
// only recieve 401 responses.
165157
#[clap(long, env = "EDITOAST_DISABLE_AUTHORIZATION", default_value_t = true)]
166158
pub disable_authorization: bool,
167-
#[derivative(Default(value = r#""http://127.0.0.1:4242/".into()"#))]
168159
#[clap(long, env = "OSRDYNE_API_URL", default_value_t = String::from("http://127.0.0.1:4242/"))]
169160
pub osrdyne_api_url: String,
170161
/// The timeout to use when performing the healthcheck, in milliseconds
171-
#[derivative(Default(value = "500"))]
172162
#[clap(long, env = "EDITOAST_HEALTH_CHECK_TIMEOUT_MS", default_value_t = 500)]
173163
pub health_check_timeout_ms: u64,
174164
}

0 commit comments

Comments
 (0)