nushell/crates/nu-command/src/math
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
..
abs.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
avg.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
ceil.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
floor.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
log.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
math_.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
max.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
median.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
min.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
mod.rs cratification: part III of the math commands to nu-cmd-extra (#9674) 2023-07-13 09:11:26 -07:00
mode.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
product.rs Replace &Span with Span since Span is Copy (#9770) 2023-07-31 21:47:46 +02:00
reducers.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
round.rs Add long options for generators and math (#10752) 2023-10-19 18:17:42 +02:00
sqrt.rs Fix output types of math commands to be narrower (#9740) 2023-10-11 21:26:35 +02:00
stddev.rs Add long options for generators and math (#10752) 2023-10-19 18:17:42 +02:00
sum.rs Replace &Span with Span since Span is Copy (#9770) 2023-07-31 21:47:46 +02:00
utils.rs Use int type name consistently (#10579) 2023-10-03 18:24:32 +02:00
variance.rs Add long options for generators and math (#10752) 2023-10-19 18:17:42 +02:00