mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 03:34:58 +02:00
Use Record APIs in nu-protocol
/nu-engine
(#10917)
# Description Consequences of #10841 This does not yet make the assumption that columns are always duplicated. Follow the existing logic here - Use saner record API in `nu-engine/src/eval.rs` - Use checked record construction in `nu-engine/src/scope.rs` - Use `values` iterator in `nu-engine/src/scope.rs` - Use `columns` iterator in `nu_engine::get_columns()` - Start using record API in `value/mod.rs` - Use `.insert` in `eval_const.rs` Record code - Record API for `eval_const.rs` table code # User-Facing Changes None # Tests + Formatting None
This commit is contained in:
committed by
GitHub
parent
0569a9c92e
commit
a46048f362
@ -3113,7 +3113,7 @@ impl Value {
|
||||
}
|
||||
(lhs, Value::List { vals: rhs, .. }) => Ok(Value::bool(rhs.contains(lhs), span)),
|
||||
(Value::String { val: lhs, .. }, Value::Record { val: rhs, .. }) => {
|
||||
Ok(Value::bool(rhs.cols.contains(lhs), span))
|
||||
Ok(Value::bool(rhs.contains(lhs), span))
|
||||
}
|
||||
(Value::String { .. } | Value::Int { .. }, Value::CellPath { val: rhs, .. }) => {
|
||||
let val = rhs.members.iter().any(|member| match (self, member) {
|
||||
@ -3161,7 +3161,7 @@ impl Value {
|
||||
}
|
||||
(lhs, Value::List { vals: rhs, .. }) => Ok(Value::bool(!rhs.contains(lhs), span)),
|
||||
(Value::String { val: lhs, .. }, Value::Record { val: rhs, .. }) => {
|
||||
Ok(Value::bool(!rhs.cols.contains(lhs), span))
|
||||
Ok(Value::bool(!rhs.contains(lhs), span))
|
||||
}
|
||||
(Value::String { .. } | Value::Int { .. }, Value::CellPath { val: rhs, .. }) => {
|
||||
let val = rhs.members.iter().any(|member| match (self, member) {
|
||||
|
Reference in New Issue
Block a user