mirror of
https://github.com/nushell/nushell
synced 2025-01-14 14:14:13 +00:00
Fix broken build: replace value_string() straggler (#12237)
# Description Fix after #12230 and #12231 crossed wires and broke the build
This commit is contained in:
parent
6795ad7e33
commit
02551c416c
2 changed files with 3 additions and 3 deletions
|
@ -238,7 +238,7 @@ fn action(input: &Value, args: &Arguments, span: Span) -> Value {
|
||||||
.and_then(|base_value| match action(&base_value, args, span) {
|
.and_then(|base_value| match action(&base_value, args, span) {
|
||||||
Value::Error { .. } => Err(ShellError::CantConvert {
|
Value::Error { .. } => Err(ShellError::CantConvert {
|
||||||
to_type: String::from("string"),
|
to_type: String::from("string"),
|
||||||
from_type: val.value_string(),
|
from_type: val.type_name(),
|
||||||
span,
|
span,
|
||||||
help: Some("this custom value can't be represented as a string".into()),
|
help: Some("this custom value can't be represented as a string".into()),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub struct PluginCustomValue {
|
||||||
/// Content shared across copies of a plugin custom value.
|
/// Content shared across copies of a plugin custom value.
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
struct SharedContent {
|
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,
|
name: String,
|
||||||
/// The bincoded representation of the custom value on the plugin side
|
/// The bincoded representation of the custom value on the plugin side
|
||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
|
@ -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 {
|
pub fn name(&self) -> &str {
|
||||||
&self.shared.name
|
&self.shared.name
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue