nushell/crates/nu-cmd-lang/src
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
..
core_commands Use Vec for Closure captures (#10940) 2023-11-08 00:43:28 +01:00
default_context.rs Allow exporting extern-wrapped (#10025) 2023-08-18 20:45:33 +03:00
example_support.rs Add detailed flag for describe (#10795) 2023-10-23 09:12:11 -05:00
example_test.rs Remove Signature.vectorizes_over_list entirely (#9777) 2023-07-26 23:34:43 +02:00
lib.rs cratification: Example support (#8231) 2023-02-27 13:58:56 -08:00