nushell/crates/nu-command/src/formats/from
Stefan Holderbach 4b301710d3
Convert more examples and tests to record! macro (#10840)
# Description
Use `record!` macro instead of defining two separate `vec!` for `cols`
and `vals` when appropriate.
This visually aligns the key with the value.
Further more you don't have to deal with the construction of `Record {
cols, vals }` so we can hide the implementation details in the future.

## State

Not covering all possible commands yet, also some tests/examples are
better expressed by creating cols and vals separately.

# User/Developer-Facing Changes
The examples and tests should read more natural. No relevant functional
change

# Bycatch

Where I noticed it I replaced usage of `Value` constructors with
`Span::test_data()` or `Span::unknown()` to the `Value::test_...`
constructors. This should make things more readable and also simplify
changes to the `Span` system in the future.
2023-10-28 14:52:31 +02:00
..
command.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
csv.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
delimited.rs fix: Ensure consistent vals and cols when parsing with --flexible (#10814) 2023-10-24 15:54:26 -05:00
json.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
mod.rs REFACTOR: move the 0% commands to nu-cmd-extra (#9404) 2023-07-06 08:31:31 -07:00
nuon.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
ods.rs Add long options for formats (#10645) 2023-10-08 19:07:09 +02:00
ssv.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
toml.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
tsv.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
xlsx.rs Add long options for formats (#10645) 2023-10-08 19:07:09 +02:00
xml.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
yaml.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00