From 02551c416c5aa249bdcd4345b7f31fd56cf13659 Mon Sep 17 00:00:00 2001 From: Devyn Cairns Date: Tue, 19 Mar 2024 05:52:49 -0700 Subject: [PATCH] Fix broken build: replace value_string() straggler (#12237) # Description Fix after #12230 and #12231 crossed wires and broke the build --- crates/nu-command/src/conversions/into/string.rs | 2 +- crates/nu-plugin/src/protocol/plugin_custom_value.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/nu-command/src/conversions/into/string.rs b/crates/nu-command/src/conversions/into/string.rs index 9cd6d900ef..2c1b232eea 100644 --- a/crates/nu-command/src/conversions/into/string.rs +++ b/crates/nu-command/src/conversions/into/string.rs @@ -238,7 +238,7 @@ fn action(input: &Value, args: &Arguments, span: Span) -> Value { .and_then(|base_value| match action(&base_value, args, span) { Value::Error { .. } => Err(ShellError::CantConvert { to_type: String::from("string"), - from_type: val.value_string(), + from_type: val.type_name(), span, help: Some("this custom value can't be represented as a string".into()), }), diff --git a/crates/nu-plugin/src/protocol/plugin_custom_value.rs b/crates/nu-plugin/src/protocol/plugin_custom_value.rs index 62537dbad1..60a54a1077 100644 --- a/crates/nu-plugin/src/protocol/plugin_custom_value.rs +++ b/crates/nu-plugin/src/protocol/plugin_custom_value.rs @@ -34,7 +34,7 @@ pub struct PluginCustomValue { /// Content shared across copies of a plugin custom value. #[derive(Clone, Debug, Serialize, Deserialize)] struct SharedContent { - /// The name of the custom value as defined by the plugin (`value_string()`) + /// The name of the type of the custom value as defined by the plugin (`type_name()`) name: String, /// The bincoded representation of the custom value on the plugin side data: Vec, @@ -146,7 +146,7 @@ impl PluginCustomValue { } } - /// The name of the custom value as defined by the plugin (`value_string()`) + /// The name of the type of the custom value as defined by the plugin (`type_name()`) pub fn name(&self) -> &str { &self.shared.name }