Fix docs typo referring to non-existant Value::CustomValue (#15954)

# Description

I was messing around with custom types and noticed `nu-protocol`
referring to a `Value::CustomValue` variant that doesn't exist. Fixed it
to say `Value::Custom` instead.

# User-Facing Changes

Documentation mentions the correct variant of `Value`

# Tests + Formatting

No new tests necessary

# After Submitting
This commit is contained in:
liquid-dragons 2025-06-12 20:34:52 +02:00 committed by GitHub
parent 22d1fdcdf6
commit d7cec2088a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ use crate::{ShellError, Span, Type, Value, ast::Operator};
pub trait CustomValue: fmt::Debug + Send + Sync { pub trait CustomValue: fmt::Debug + Send + Sync {
/// Custom `Clone` implementation /// Custom `Clone` implementation
/// ///
/// This can reemit a `Value::CustomValue(Self, span)` or materialize another representation /// This can reemit a `Value::Custom(Self, span)` or materialize another representation
/// if necessary. /// if necessary.
fn clone_value(&self, span: Span) -> Value; fn clone_value(&self, span: Span) -> Value;

View File

@ -1981,7 +1981,7 @@ impl Value {
/// as it will point into unknown source when used in errors. /// as it will point into unknown source when used in errors.
/// ///
/// Returns a `Vec` containing one of each value case (`Value::Int`, `Value::String`, etc.) /// Returns a `Vec` containing one of each value case (`Value::Int`, `Value::String`, etc.)
/// except for `Value::CustomValue`. /// except for `Value::Custom`.
pub fn test_values() -> Vec<Value> { pub fn test_values() -> Vec<Value> {
vec![ vec![
Value::test_bool(false), Value::test_bool(false),