nushell/crates/nu-command/src/env
Ian Manske 60da7abbc7
Use Vec for Closure captures (#10940)
# Description
Changes the `captures` field in `Closure` from a `HashMap` to a `Vec`
and makes `Stack::captures_to_stack` take an owned `Vec` instead of a
borrowed `HashMap`.

This eliminates the conversion to a `Vec` inside `captures_to_stack` and
makes it possible to avoid clones altogether when using an owned
`Closure` (which is the case for most commands). Additionally, using a
`Vec` reduces the size of `Value` by 8 bytes (down to 72).

# User-Facing Changes
Breaking API change for `nu-protocol`.
2023-11-08 00:43:28 +01:00
..
config Fix editor config for reedline and config nu/env (#10535) 2023-09-29 16:36:03 +02:00
export_env.rs Use Vec for Closure captures (#10940) 2023-11-08 00:43:28 +01:00
load_env.rs Convert ShellError::UnsupportedInput to named fields (#10971) 2023-11-07 23:25:32 +01:00
mod.rs remove let-env, focus on mutating $env (#9574) 2023-07-01 07:57:51 +12:00
source_env.rs Recursively export constants from modules (#10049) 2023-08-20 14:51:35 +02:00
with_env.rs Use Vec for Closure captures (#10940) 2023-11-08 00:43:28 +01:00