nushell/crates/nu-protocol/src/value
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
..
custom_value.rs Fix to json for SQLite databases (#8343) 2023-03-06 14:36:26 -08:00
from_value.rs Use int type name consistently (#10579) 2023-10-03 18:24:32 +02:00
from.rs Spanned Value step 1: span all value cases (#10042) 2023-08-25 08:48:05 +12:00
lazy_record.rs Create Record type (#10103) 2023-08-25 07:50:29 +12:00
mod.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
range.rs Auto format let-else block (#10214) 2023-09-04 19:42:31 +12:00
record.rs Create Record type (#10103) 2023-08-25 07:50:29 +12:00
stream.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
unit.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00