mirror of
https://github.com/nushell/nushell.git
synced 2024-12-11 17:51:50 +01:00
10 lines
296 B
Rust
10 lines
296 B
Rust
|
use crate::object::{Primitive, Value};
|
||
|
use crate::prelude::*;
|
||
|
|
||
|
pub fn to_toml(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||
|
let out = args.input;
|
||
|
Ok(out
|
||
|
.map(|a| ReturnValue::Value(Value::Primitive(Primitive::String(toml::to_string(&a).unwrap()))))
|
||
|
.boxed())
|
||
|
}
|