Context cleanup (#2581)

* Specialize 'Context' to EvaluationContext and CompletionContext

* Specialize 'Context' to EvaluationContext and CompletionContext

* fmt
This commit is contained in:
Jonathan Turner
2020-09-20 09:29:51 +12:00
committed by GitHub
parent 798766b4b5
commit 1882a32b83
77 changed files with 433 additions and 461 deletions

View File

@ -81,7 +81,7 @@ impl WholeStreamCommand for Reduce {
async fn process_row(
block: Arc<Block>,
scope: Arc<Scope>,
mut context: Arc<Context>,
mut context: Arc<EvaluationContext>,
row: Value,
) -> Result<InputStream, ShellError> {
let row_clone = row.clone();
@ -104,7 +104,7 @@ async fn reduce(
) -> Result<OutputStream, ShellError> {
let registry = registry.clone();
let base_scope = raw_args.call_info.scope.clone();
let context = Arc::new(Context::from_raw(&raw_args, &registry));
let context = Arc::new(EvaluationContext::from_raw(&raw_args, &registry));
let (reduce_args, mut input): (ReduceArgs, _) = raw_args.process(&registry).await?;
let block = Arc::new(reduce_args.block);
let (ioffset, start) = match reduce_args.fold {