This commit is contained in:
JT
2021-09-04 19:59:38 +12:00
parent 198a36b744
commit d9cff4238d
8 changed files with 31 additions and 40 deletions

View File

@ -26,7 +26,7 @@ impl Command for Do {
) -> Result<nu_protocol::Value, nu_protocol::ShellError> {
let block = &call.positional[0];
let out = eval_expression(context, &block)?;
let out = eval_expression(context, block)?;
match out {
Value::Block { val: block_id, .. } => {

View File

@ -48,7 +48,7 @@ impl Command for Each {
let block = engine_state.get_block(block);
let state = context.enter_scope();
state.add_var(var_id, x.clone());
state.add_var(var_id, x);
//FIXME: DON'T UNWRAP
eval_block(&state, block, Value::nothing()).unwrap()
@ -63,7 +63,7 @@ impl Command for Each {
let block = engine_state.get_block(block);
let state = context.enter_scope();
state.add_var(var_id, x.clone());
state.add_var(var_id, x);
//FIXME: DON'T UNWRAP
eval_block(&state, block, Value::nothing()).unwrap()

View File

@ -60,7 +60,7 @@ impl Command for For {
let block = engine_state.get_block(block);
let state = context.enter_scope();
state.add_var(var_id, x.clone());
state.add_var(var_id, x);
//FIXME: DON'T UNWRAP
eval_block(&state, block, Value::nothing()).unwrap()
@ -76,7 +76,7 @@ impl Command for For {
let block = engine_state.get_block(block);
let state = context.enter_scope();
state.add_var(var_id, x.clone());
state.add_var(var_id, x);
//FIXME: DON'T UNWRAP
eval_block(&state, block, Value::nothing()).unwrap()