Revert "Add support for optional list stream output formatting (#6325)" (#6454)

This reverts commit ec4e3a6d5c.
This commit is contained in:
Darren Schroeder
2022-08-31 18:09:40 -05:00
committed by GitHub
parent 3ec53e544c
commit 4858a9a817
21 changed files with 60 additions and 181 deletions

View File

@ -62,9 +62,7 @@ pub fn calculate(
mf: impl Fn(&[Value], &Span) -> Result<Value, ShellError>,
) -> Result<Value, ShellError> {
match values {
PipelineData::ListStream(s, ..) => {
helper_for_tables(&s.map(|(v, _)| v).collect::<Vec<Value>>(), name, mf)
}
PipelineData::ListStream(s, ..) => helper_for_tables(&s.collect::<Vec<Value>>(), name, mf),
PipelineData::Value(Value::List { ref vals, .. }, ..) => match &vals[..] {
[Value::Record { .. }, _end @ ..] => helper_for_tables(vals, name, mf),
_ => mf(vals, &name),