Switch to "engine-p" (#3270)

* WIP

* WIP

* first builds

* Tests pass
This commit is contained in:
Jonathan Turner
2021-04-07 04:19:43 +12:00
committed by GitHub
parent ad1c4f5e39
commit 073e5727c6
262 changed files with 2269 additions and 2660 deletions

View File

@ -11,7 +11,6 @@ struct Arguments {
precision: Option<Tagged<i64>>,
}
#[async_trait]
impl WholeStreamCommand for SubCommand {
fn name(&self) -> &str {
"math round"
@ -30,8 +29,8 @@ impl WholeStreamCommand for SubCommand {
"Applies the round function to a list of numbers"
}
async fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
operate(args).await
fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
operate(args)
}
fn examples(&self) -> Vec<Example> {
@ -58,8 +57,8 @@ impl WholeStreamCommand for SubCommand {
}
}
async fn operate(args: CommandArgs) -> Result<OutputStream, ShellError> {
let (Arguments { precision }, input) = args.process().await?;
fn operate(args: CommandArgs) -> Result<OutputStream, ShellError> {
let (Arguments { precision }, input) = args.process()?;
let precision = precision.map(|p| p.item).unwrap_or(0);
let mapped = input.map(move |val| match val.value {