mirror of
https://github.com/nushell/nushell
synced 2025-01-14 22:24:54 +00:00
10 lines
276 B
Rust
10 lines
276 B
Rust
use crate::object::Value;
|
|
use crate::prelude::*;
|
|
|
|
pub fn to_array(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
|
let out = args.input.collect();
|
|
Ok(out
|
|
.map(|vec: Vec<_>| single_output(Value::List(vec)))
|
|
.flatten_stream()
|
|
.boxed())
|
|
}
|