mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Reuse Closure
type in Value::Closure
(#10894)
# Description Reuses the existing `Closure` type in `Value::Closure`. This will help with the span refactoring for `Value`. Additionally, this allows us to more easily box or unbox the `Closure` case should we chose to do so in the future. # User-Facing Changes Breaking API change for `nu_protocol`.
This commit is contained in:
@ -253,7 +253,7 @@ pub fn debug_string_without_formatting(value: &Value) -> String {
|
||||
},
|
||||
//TODO: It would be good to drill in deeper to blocks and closures.
|
||||
Value::Block { val, .. } => format!("<Block {val}>"),
|
||||
Value::Closure { val, .. } => format!("<Closure {val}>"),
|
||||
Value::Closure { val, .. } => format!("<Closure {}>", val.block_id),
|
||||
Value::Nothing { .. } => String::new(),
|
||||
Value::Error { error, .. } => format!("{error:?}"),
|
||||
Value::Binary { val, .. } => format!("{val:?}"),
|
||||
|
Reference in New Issue
Block a user