Make arg eval lazy, remove old arg evaluation code (#3603)

* Remove old argument eval

* Merge main

* fmt

* clippy

* clippy

* clippy
This commit is contained in:
JT
2021-06-11 13:57:01 +12:00
committed by GitHub
parent c4163c3621
commit 8ac572ed27
218 changed files with 448 additions and 1075 deletions

View File

@ -50,7 +50,6 @@ impl WholeStreamCommand for SubCommand {
}
pub fn bool_command(args: CommandArgs) -> Result<OutputStream, ShellError> {
let args = args.evaluate_once()?;
let cmd_args = BoolArgs {
bias: args.get_flag("bias")?,
};

View File

@ -53,7 +53,6 @@ impl WholeStreamCommand for SubCommand {
}
pub fn chars(args: CommandArgs) -> Result<OutputStream, ShellError> {
let args = args.evaluate_once()?;
let cmd_args = CharsArgs {
length: args.get_flag("length")?,
};

View File

@ -56,7 +56,6 @@ impl WholeStreamCommand for SubCommand {
}
pub fn decimal(args: CommandArgs) -> Result<OutputStream, ShellError> {
let args = args.evaluate_once()?;
let cmd_args = DecimalArgs {
range: args.opt(0)?,
};

View File

@ -60,7 +60,6 @@ impl WholeStreamCommand for SubCommand {
pub fn dice(args: CommandArgs) -> Result<OutputStream, ShellError> {
let tag = args.call_info.name_tag.clone();
let args = args.evaluate_once()?;
let cmd_args = DiceArgs {
dice: args.get_flag("dice")?,
sides: args.get_flag("sides")?,

View File

@ -56,7 +56,6 @@ impl WholeStreamCommand for SubCommand {
}
pub fn integer(args: CommandArgs) -> Result<OutputStream, ShellError> {
let args = args.evaluate_once()?;
let cmd_args = IntegerArgs {
range: args.opt(0)?,
};