Remove EvaluationContext::from_args (#3604)

This commit is contained in:
JT
2021-06-11 18:35:21 +12:00
committed by GitHub
parent 8ac572ed27
commit b9ca3b2039
32 changed files with 45 additions and 60 deletions

View File

@@ -33,7 +33,7 @@ impl WholeStreamCommand for SubCommand {
pub fn clear(args: CommandArgs) -> Result<OutputStream, ShellError> {
let name = args.call_info.name_tag.clone();
let ctx = EvaluationContext::from_args(&args);
let ctx = &args.context;
let result = if let Some(global_cfg) = &mut args.configs().lock().global_config {
global_cfg.vars.clear();

View File

@@ -37,7 +37,7 @@ impl WholeStreamCommand for SubCommand {
pub fn get(args: CommandArgs) -> Result<OutputStream, ShellError> {
let name = args.call_info.name_tag.clone();
let ctx = EvaluationContext::from_args(&args);
let ctx = &args.context;
let column_path = args.req(0)?;

View File

@@ -38,7 +38,7 @@ impl WholeStreamCommand for SubCommand {
pub fn remove(args: CommandArgs) -> Result<OutputStream, ShellError> {
let name = args.call_info.name_tag.clone();
let ctx = EvaluationContext::from_args(&args);
let ctx = &args.context;
let remove: Tagged<String> = args.req(0)?;
let key = remove.to_string();

View File

@@ -52,7 +52,7 @@ impl WholeStreamCommand for SubCommand {
pub fn set(args: CommandArgs) -> Result<OutputStream, ShellError> {
let name = args.call_info.name_tag.clone();
let ctx = EvaluationContext::from_args(&args);
let ctx = &args.context;
let column_path = args.req(0)?;
let mut value: Value = args.req(1)?;

View File

@@ -38,7 +38,7 @@ impl WholeStreamCommand for SubCommand {
pub fn set_into(args: CommandArgs) -> Result<OutputStream, ShellError> {
let name = args.call_info.name_tag.clone();
let ctx = EvaluationContext::from_args(&args);
let ctx = &args.context;
let set_into: Tagged<String> = args.req(0)?;