mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Use record API in more parts of nu-protocol
(#10928)
# Description This is pretty complementary/orthogonal to @IanManske 's changes to `Value` cellpath accessors in: - #10925 - to a lesser extent #10926 ## Steps - Use `R.remove` in `Value.remove_data_at_cell_path` - Pretty sound after #10875 (tests mentioned in commit message have been removed by that) - Update `did_you_mean` helper to use iterator - Change `Value::columns` to return iterator - This is not a place of honor - Use `Record::get` in `Value::get_data_by_key` # User-Facing Changes None intentional, potential edge cases on duplicated columns could change (considered undefined behavior) # Tests + Formatting (-)
This commit is contained in:
committed by
GitHub
parent
44c0db46e1
commit
92503e6571
@ -99,7 +99,7 @@ impl Iterator for UpdateCellIterator {
|
||||
match self.input.next() {
|
||||
Some(val) => {
|
||||
if let Some(ref cols) = self.columns {
|
||||
if !val.columns().iter().any(|c| cols.contains(c)) {
|
||||
if !val.columns().any(|c| cols.contains(c)) {
|
||||
return Some(val);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user