Convert more examples and tests to record! macro#10840
Merged
sholderbach merged 78 commits intonushell:mainfrom Oct 28, 2023
Merged
Convert more examples and tests to record! macro#10840sholderbach merged 78 commits intonushell:mainfrom
record! macro#10840sholderbach merged 78 commits intonushell:mainfrom
Conversation
fdncred
approved these changes
Oct 25, 2023
Contributor
fdncred
left a comment
There was a problem hiding this comment.
Looks good standardizing to record!()
afe16ea to
4cf4c0a
Compare
4cf4c0a to
c5ec8b0
Compare
Contributor
|
here's the next 1000 commits. lol |
amtoine
approved these changes
Oct 26, 2023
Member
amtoine
left a comment
There was a problem hiding this comment.
wow that sounds tideous, you were extra brave on that one @sholderbach 🙏
i scrolled quickly the changes and they looked ok from far away, i think we can trust you on that one 😌
Member
|
@sholderbach |
Member
Author
|
Done. No more manual |
Contributor
|
wow, what a marathon! great job! |
hardfau1t
pushed a commit
to hardfau1t/nushell
that referenced
this pull request
Dec 14, 2023
# 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.
dmatos2012
pushed a commit
to dmatos2012/nushell
that referenced
this pull request
Feb 20, 2024
# 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Use
record!macro instead of defining two separatevec!forcolsandvalswhen 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
Valueconstructors withSpan::test_data()orSpan::unknown()to theValue::test_...constructors. This should make things more readable and also simplify changes to theSpansystem in the future.