nothing converted to string should return nothing and not fail (#3459)

This commit is contained in:
Darren Schroeder 2021-05-21 11:06:53 -05:00 committed by GitHub
parent 9776a252ee
commit cb90b90cbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -140,6 +140,7 @@ pub fn action(
let byte_string = InlineShape::format_bytes(*a_filesize, None);
byte_string.1
}
Primitive::Nothing => "nothing".to_string(),
_ => {
return Err(ShellError::unimplemented(
"str from for non-numeric primitives",

View File

@ -132,10 +132,12 @@ pub fn action(
let byte_string = InlineShape::format_bytes(*a_filesize, None);
byte_string.1
}
Primitive::Nothing => "nothing".to_string(),
_ => {
return Err(ShellError::unimplemented(
"str from for non-numeric primitives",
))
return Err(ShellError::unimplemented(&format!(
"str from for non-numeric primitives {:?}",
prim
)))
}
})
.into_value(tag)),