nushell/crates/nu-command/src/strings
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
..
encode_decode Use long options for string (#10777) 2023-10-19 22:08:09 +02:00
format update format date when using %x %X %r (#10272) 2023-09-08 08:59:05 -05:00
split Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
str_ Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
char_.rs Use long options for string (#10777) 2023-10-19 22:08:09 +02:00
detect_columns.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
mod.rs Move format duration/filesize back into core (#9978) 2023-08-11 06:01:47 +12:00
parse.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
size.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00