mirror of
https://github.com/nushell/nushell.git
synced 2025-05-17 08:20:49 +02:00
# Description `Value` describes the types of first-class values that users and scripts can create, manipulate, pass around, and store. However, `Block`s are not first-class values in the language, so this PR removes it from `Value`. This removes some unnecessary code, and this change should be invisible to the user except for the change to `scope modules` described below. # User-Facing Changes Breaking change: the output of `scope modules` was changed so that `env_block` is now `has_env_block` which is a boolean value instead of a `Block`. # After Submitting Update the language guide possibly.
10 lines
212 B
Rust
10 lines
212 B
Rust
use crate::{BlockId, Value, VarId};
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct Closure {
|
|
pub block_id: BlockId,
|
|
pub captures: Vec<(VarId, Value)>,
|
|
}
|