mirror of
https://github.com/nushell/nushell.git
synced 2024-12-26 08:59:12 +01:00
005180f269
# Description While we have now a few ways to add items or iterate over the collection, we don't have a way to cleanly remove items from `Record`. This PR fixes that: - Add `Record.remove()` to remove by key - makes the assumption that keys are unique, so can not be used universally, yet (see #10875 for an important example) - Add naive `Record.retain()` for inplace removal - This follows the two separate `retain`/`retain_mut` in the Rust std library types, compared to the value-mutating `retain` in `indexmap` - Add `Record.retain_mut()` for one-pass pruning Continuation of #10841 # User-Facing Changes None yet. # Tests + Formatting Doctests for the `retain`ing fun |
||
---|---|---|
.. | ||
ast | ||
engine | ||
value | ||
alias.rs | ||
cli_error.rs | ||
config.rs | ||
did_you_mean.rs | ||
eval_const.rs | ||
example.rs | ||
exportable.rs | ||
id.rs | ||
lev_distance.rs | ||
lib.rs | ||
module.rs | ||
parse_error.rs | ||
pipeline_data.rs | ||
plugin_signature.rs | ||
shell_error.rs | ||
signature.rs | ||
span.rs | ||
syntax_shape.rs | ||
ty.rs | ||
util.rs | ||
variable.rs |