From ac38ee82f4b5d06851a1f37f08e8219f5b43de2e Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 25 May 2021 07:49:12 -0500 Subject: [PATCH] error message cleanup for into string (#3488) --- crates/nu-command/src/commands/into/string.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/nu-command/src/commands/into/string.rs b/crates/nu-command/src/commands/into/string.rs index d0c33afca2..e7de1da013 100644 --- a/crates/nu-command/src/commands/into/string.rs +++ b/crates/nu-command/src/commands/into/string.rs @@ -142,20 +142,20 @@ pub fn action( } Primitive::Nothing => "nothing".to_string(), _ => { - return Err(ShellError::unimplemented( - "str from for non-numeric primitives", - )) + return Err(ShellError::unimplemented(&format!( + "into string for primitive: {:?}", + prim + ))) } }) .into_value(tag)), UntaggedValue::Row(_) => Err(ShellError::labeled_error( - "specify column to use 'str from'", + "specify column to use 'into string'", "found table", input.tag.clone(), )), - _ => Err(ShellError::unimplemented( - "str from for non-primitive, non-table types", - )), + UntaggedValue::Table(_) => Err(ShellError::unimplemented("into string for table")), + _ => Err(ShellError::unimplemented("into string for non-primitive")), } }