mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 19:37:45 +02:00
Remove Record::from_raw_cols_vals_unchecked
(#11810)
# Description Follows from #11718 and replaces all usages of `Record::from_raw_cols_vals_unchecked` with iterator or `record!` equivalents.
This commit is contained in:
@ -4,7 +4,7 @@ mod roll_left;
|
||||
mod roll_right;
|
||||
mod roll_up;
|
||||
|
||||
use nu_protocol::{Record, ShellError, Value};
|
||||
use nu_protocol::{ShellError, Value};
|
||||
pub use roll_::Roll;
|
||||
pub use roll_down::RollDown;
|
||||
pub use roll_left::RollLeft;
|
||||
@ -70,10 +70,8 @@ fn horizontal_rotate_value(
|
||||
HorizontalDirection::Left => vals.rotate_left(rotations),
|
||||
}
|
||||
|
||||
Ok(Value::record(
|
||||
Record::from_raw_cols_vals_unchecked(cols, vals),
|
||||
span,
|
||||
))
|
||||
let record = cols.into_iter().zip(vals).collect();
|
||||
Ok(Value::record(record, span))
|
||||
}
|
||||
Value::List { vals, .. } => {
|
||||
let values = vals
|
||||
|
Reference in New Issue
Block a user