forked from extern/nushell
Construct Record
s only through checked helpers (#11386)
# Description Constructing the internals of `Record` without checking the lengths is bad. (also incompatible with changes to how we store records) - Use `Record::from_raw_cols_vals` in dataframe code - Use `record!` macro in dataframe test - Use `record!` in `nu-color-config` tests - Stop direct record construction in `nu-command` - Refactor table construction in `from nuon` # User-Facing Changes None # Tests + Formatting No new tests, updated tests in equal fashion
This commit is contained in:
committed by
GitHub
parent
6f384da57e
commit
8cfa96b4c0
@@ -258,16 +258,16 @@ fn histogram_impl(
|
||||
result.push((
|
||||
count, // attach count first for easily sorting.
|
||||
Value::record(
|
||||
Record {
|
||||
cols: result_cols.clone(),
|
||||
vals: vec![
|
||||
Record::from_raw_cols_vals(
|
||||
result_cols.clone(),
|
||||
vec![
|
||||
val.into_value(),
|
||||
Value::int(count, span),
|
||||
Value::float(quantile, span),
|
||||
Value::string(percentage, span),
|
||||
Value::string(freq, span),
|
||||
],
|
||||
},
|
||||
),
|
||||
span,
|
||||
),
|
||||
));
|
||||
|
Reference in New Issue
Block a user