Repository navigation
Refactor each - #16732
Merged
Merged
Refactor each#16732
each#16732Conversation
the closures never return None
- add Value::unwrap_error - dont imperatively push to a vec, use collect - errors encountered during collecting ListStream werent properly chained, lifting error chaining out of the match expression deduplicates the code *and* fixes that - early exit on empty inputs, *and* preserve metadata
This also fixes an (unnoticed) bug in the ByteStream arm
Member
Author
|
I need to write some tests (so we don't get regressions for the chained error in the future) before we can merge. Pushed early to allow reviews. |
cptpiepmatz
self-requested a review
September 22, 2025 17:18
Member
|
I think the impl looks good, I'll wait with the approve until we have the tests. |
cptpiepmatz
approved these changes
Sep 23, 2025
Bahex
added a commit
to Bahex/nushell
that referenced
this pull request
Sep 23, 2025
Sort of a follow up to nushell#16732, makes the stream-collecting error handling universal. This fixes similar bugs everywhere.
WindSoilder
pushed a commit
that referenced
this pull request
Sep 24, 2025
Sort of a follow up to #16732, makes the stream-collecting error handling universal. This fixes similar bugs everywhere. ## Release notes summary - What our users need to know > TODO(release-notes): Merge this with #16732's notes, this just generalizes the fix for all commands. ## Tasks after submitting N/A
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.
Mostly clean up. Non-insignificant changes listed in release notes section:
each's behavior onByteStreaminputs differed fromListStreaminputs with regards to error handling. Now they use the same implementation.--keep-emptycheck out of thefilterclosure.Release notes summary - What our users need to know
N/A
Tasks after submitting
N/A