forked from extern/nushell
nothing converted to string should return nothing and not fail (#3459)
This commit is contained in:
parent
9776a252ee
commit
cb90b90cbf
@ -140,6 +140,7 @@ pub fn action(
|
|||||||
let byte_string = InlineShape::format_bytes(*a_filesize, None);
|
let byte_string = InlineShape::format_bytes(*a_filesize, None);
|
||||||
byte_string.1
|
byte_string.1
|
||||||
}
|
}
|
||||||
|
Primitive::Nothing => "nothing".to_string(),
|
||||||
_ => {
|
_ => {
|
||||||
return Err(ShellError::unimplemented(
|
return Err(ShellError::unimplemented(
|
||||||
"str from for non-numeric primitives",
|
"str from for non-numeric primitives",
|
||||||
|
@ -132,10 +132,12 @@ pub fn action(
|
|||||||
let byte_string = InlineShape::format_bytes(*a_filesize, None);
|
let byte_string = InlineShape::format_bytes(*a_filesize, None);
|
||||||
byte_string.1
|
byte_string.1
|
||||||
}
|
}
|
||||||
|
Primitive::Nothing => "nothing".to_string(),
|
||||||
_ => {
|
_ => {
|
||||||
return Err(ShellError::unimplemented(
|
return Err(ShellError::unimplemented(&format!(
|
||||||
"str from for non-numeric primitives",
|
"str from for non-numeric primitives {:?}",
|
||||||
))
|
prim
|
||||||
|
)))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.into_value(tag)),
|
.into_value(tag)),
|
||||||
|
Loading…
Reference in New Issue
Block a user