mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 13:15:58 +02:00
ListStream
touchup (#12524)
# Description Does some misc changes to `ListStream`: - Moves it into its own module/file separate from `RawStream`. - `ListStream`s now have an associated `Span`. - This required changes to `ListStreamInfo` in `nu-plugin`. Note sure if this is a breaking change for the plugin protocol. - Hides the internals of `ListStream` but also adds a few more methods. - This includes two functions to more easily alter a stream (these take a `ListStream` and return a `ListStream` instead of having to go through the whole `into_pipeline_data(..)` route). - `map`: takes a `FnMut(Value) -> Value` - `modify`: takes a function to modify the inner stream.
This commit is contained in:
@ -69,7 +69,7 @@ pub fn calculate(
|
||||
let span = values.span().unwrap_or(name);
|
||||
match values {
|
||||
PipelineData::ListStream(s, ..) => {
|
||||
helper_for_tables(&s.collect::<Vec<Value>>(), span, name, mf)
|
||||
helper_for_tables(&s.into_iter().collect::<Vec<Value>>(), span, name, mf)
|
||||
}
|
||||
PipelineData::Value(Value::List { ref vals, .. }, ..) => match &vals[..] {
|
||||
[Value::Record { .. }, _end @ ..] => helper_for_tables(
|
||||
|
Reference in New Issue
Block a user