use clap::{App, Arg, ArgSettings, SubCommand};
pub trait MathSubCommands {
fn math_subcommands(self) -> Self;
}
impl MathSubCommands for App<'_, '_> {
fn math_subcommands(self) -> Self {
self.subcommand(
SubCommand::with_name("math")
.about("TODO")
.alias("math")
.subcommands(
vec![
SubCommand::with_name("tick_to_sqrt_price")
.arg(
Arg::with_name("tick")
.index(1).set(ArgSettings::AllowLeadingHyphen)
.value_name("TICK").required(true)
),
SubCommand::with_name("sqrt_price_to_tick")
.arg(
Arg::with_name("price")
.index(1).value_name("PRICE").required(true)
),
]
)
)
}
}