Skip to content

Commit f1b238a

Browse files
authored
- change optimize_path_order to be a Option<bool> so we can set false or true (#99)
Signed-off-by: Erwan MAS <erwan@mas.nom.fr>
1 parent 407a6d3 commit f1b238a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cli/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct Opt {
9494
extra_attribute_name: Option<String>,
9595
#[arg(long)]
9696
/// Reorder paths to minimize travel time
97-
optimize_path_order: bool,
97+
optimize_path_order: Option<bool>,
9898
}
9999

100100
fn main() -> io::Result<()> {
@@ -171,7 +171,9 @@ fn main() -> io::Result<()> {
171171
}
172172

173173
settings.conversion.extra_attribute_name = opt.extra_attribute_name;
174-
settings.conversion.optimize_path_order = opt.optimize_path_order;
174+
if let Some(optimize_path_order) = opt.optimize_path_order {
175+
settings.conversion.optimize_path_order = optimize_path_order;
176+
}
175177

176178
if let Version::Unknown(ref unknown) = settings.version {
177179
error!(

0 commit comments

Comments
 (0)