nushell/crates/nu-command/src/debug
Ian Manske bae6d694ca
Refactor using ClosureEval types (#12541)
# Description
Adds two new types in `nu-engine` for evaluating closures: `ClosureEval`
and `ClosureEvalOnce`. This removed some duplicate code and centralizes
our logic for setting up, running, and cleaning up closures. For
example, in the future if we are able to reduce the cloning necessary to
run a closure, then we only have to change the code related to these
types.

`ClosureEval` and `ClosureEvalOnce` are designed with a builder API.
`ClosureEval` is used to run a closure multiple times whereas
`ClosureEvalOnce` is used for a one-shot closure.

# User-Facing Changes
Should be none, unless I messed up one of the command migrations.
Actually, this will fix any unreported environment bugs for commands
that didn't reset the env after running a closure.
2024-04-22 14:15:09 +08:00
..
ast.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
debug_.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
explain.rs Remove the Value::Block case (#12582) 2024-04-21 07:03:33 +02:00
info.rs Use safe nix API instead of libc (#12315) 2024-03-30 14:49:54 +01:00
inspect_table.rs Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
inspect.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
metadata_set.rs add ability to set metadata (#12564) 2024-04-19 09:03:59 +08:00
metadata.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
mod.rs add ability to set metadata (#12564) 2024-04-19 09:03:59 +08:00
profile.rs Refactor using ClosureEval types (#12541) 2024-04-22 14:15:09 +08:00
timeit.rs Replace subtraction of Instants and Durations with saturating subtractions (#12549) 2024-04-17 07:25:16 -05:00
view_files.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
view_source.rs Remove the Value::Block case (#12582) 2024-04-21 07:03:33 +02:00
view_span.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
view.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00