Move more parts to tags and away from spans

This commit is contained in:
Jonathan Turner
2019-08-05 20:54:29 +12:00
parent f0e2ca76dc
commit 99671b8ffc
57 changed files with 627 additions and 492 deletions

View File

@ -46,10 +46,10 @@ pub fn to_yaml(args: CommandArgs) -> Result<OutputStream, ShellError> {
.values
.map(
move |a| match serde_yaml::to_string(&value_to_yaml_value(&a)) {
Ok(x) => {
ReturnSuccess::value(Value::Primitive(Primitive::String(x)).tagged(name_span))
}
Err(_) => Err(ShellError::maybe_labeled_error(
Ok(x) => ReturnSuccess::value(
Value::Primitive(Primitive::String(x)).simple_spanned(name_span),
),
Err(_) => Err(ShellError::labeled_error(
"Can not convert to YAML string",
"can not convert piped data to YAML string",
name_span,