This PR adds an arg_enum style macro for so we don't have to manually implement FromStr and variants for argument enums. This is done since it is a fairly simple macro and so we don't have to pull in clap into services-core.
Test Plan
Check that the new arguments parse correctly:
$ cargo run -p driver -- --solver-type BestRingSolver --solver-internal-optimizer Gurobi --scheduler Evm
Finished dev [unoptimized + debuginfo] target(s) in 0.13s
Running `target/debug/driver --solver-type BestRingSolver --solver-internal-optimizer Gurobi --scheduler Evm`
2020-09-09T04:45:26.574Z INFO [driver] Starting driver with runtime options: Options {
...
solver_type: BestRingSolver,
solver_internal_optimizer: Gurobi,
...
scheduler: Evm,
...
}
This PR adds an
arg_enum
style macro for so we don't have to manually implementFromStr
andvariants
for argument enums. This is done since it is a fairly simple macro and so we don't have to pull inclap
intoservices-core
.Test Plan
Check that the new arguments parse correctly: