nushell/crates/nu-engine/src
Stefan Holderbach edbf3aaccb
Use Record's public API in a bunch of places (#10927)
# Description
Since #10841 the goal is to remove the implementation details of
`Record` outside of core operations.

To this end use Record iterators and map-like accessors in a bunch of
places. In this PR I try to collect the boring cases where I don't
expect any dramatic performance impacts or don't have doubts about the
correctness afterwards

- Use checked record construction in `nu_plugin_example`
- Use `Record::into_iter` in `columns`
- Use `Record` iterators in `headers` cmd
- Use explicit record iterators in `split-by`
- Use `Record::into_iter` in variable completions
- Use `Record::values` iterator in `into sqlite`
- Use `Record::iter_mut` for-loop in `default`
- Change `nu_engine::nonexistent_column` to use iterator
- Use `Record::columns` iter in `nu-cmd-base`
- Use `Record::get_index` in `nu-command/network/http`
- Use `Record.insert()` in `merge`
- Refactor `move` to use encapsulated record API
- Use `Record.insert()` in `explore`
- Use proper `Record` API in `explore`
- Remove defensiveness around record in `explore`
- Use encapsulated record API in more `nu-command`s

# User-Facing Changes
None intentional

# Tests + Formatting
(-)
2023-11-08 14:24:00 +01:00
..
call_ext.rs Make FromValue take owned Values (#10900) 2023-10-31 19:47:00 +01:00
column.rs Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
documentation.rs Add themes to help command when available #10318 (#10623) 2023-10-10 07:40:05 -05:00
env.rs Reuse Closure type in Value::Closure (#10894) 2023-10-30 23:34:23 +01:00
eval.rs Use Vec for Closure captures (#10940) 2023-11-08 00:43:28 +01:00
glob_from.rs fix clippy (#10659) 2023-10-10 03:31:15 +13:00
lib.rs Allow operator in constants (#10212) 2023-09-05 16:35:58 +02:00
scope.rs Use Record APIs in nu-protocol/nu-engine (#10917) 2023-11-01 23:19:58 +01:00