nushell/crates/nu-engine/src
132ikl 553c951a60
Fix match running closures as block (#15032)
# Description
This PR makes `match` no longer run closures as if they were blocks.
This also allows returning closures from `match` without needing to wrap
in an outer subexpression or block.

Before PR:
```nushell
match 1 { _ => {|| print hi} }
# => hi
```

After PR:
```nushell
match 1 { _ => {|| print hi} }
# => closure_1090
```

# User-Facing Changes

* `match` no longer runs closures as if they were blocks

# Tests + Formatting

N/A

# After Submitting

N/A
2025-02-11 10:35:23 +01:00
..
compile Fix match running closures as block (#15032) 2025-02-11 10:35:23 +01:00
call_ext.rs Remove duplicate implementations of CallExt::rest (#14484) 2024-12-01 15:03:45 +01:00
closure_eval.rs Make timeit take only closures as an argument (#14483) 2024-12-10 23:08:53 +08:00
column.rs Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
command_prelude.rs Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
documentation.rs finish removing terminal_size dep (#14819) 2025-01-13 07:00:21 -06:00
env.rs Replaced IoError::new calls that still had Span::unknown() (#14968) 2025-01-30 06:20:26 -06:00
eval_helpers.rs Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00
eval_ir.rs Enable nushell error with backtrace (#14945) 2025-02-06 22:05:58 +08:00
eval.rs Add run-time type checking for command pipeline input (#14741) 2025-01-08 23:09:47 +01:00
glob_from.rs Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00
scope.rs fix: clippy warning of rust 1.8.4 (#14984) 2025-02-02 07:56:54 -06:00