forked from extern/nushell
Fix typo in "occurrences"
This commit is contained in:
parent
84da815b22
commit
3dc95ef765
@ -127,13 +127,13 @@ pub async fn histogram(
|
|||||||
.table_entries()
|
.table_entries()
|
||||||
.map(move |value| {
|
.map(move |value| {
|
||||||
let values = value.table_entries().cloned().collect::<Vec<_>>();
|
let values = value.table_entries().cloned().collect::<Vec<_>>();
|
||||||
let ocurrences = values.len();
|
let occurrences = values.len();
|
||||||
|
|
||||||
(ocurrences, values[ocurrences - 1].clone())
|
(occurrences, values[occurrences - 1].clone())
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(move |(ocurrences, value)| {
|
.map(move |(occurrences, value)| {
|
||||||
let mut fact = TaggedDictBuilder::new(&name);
|
let mut fact = TaggedDictBuilder::new(&name);
|
||||||
let column_value = labels
|
let column_value = labels
|
||||||
.get(idx)
|
.get(idx)
|
||||||
@ -147,7 +147,7 @@ pub async fn histogram(
|
|||||||
.clone();
|
.clone();
|
||||||
|
|
||||||
fact.insert_value(&column.item, column_value);
|
fact.insert_value(&column.item, column_value);
|
||||||
fact.insert_untagged("ocurrences", UntaggedValue::int(ocurrences));
|
fact.insert_untagged("occurrences", UntaggedValue::int(occurrences));
|
||||||
|
|
||||||
let percentage = format!(
|
let percentage = format!(
|
||||||
"{}%",
|
"{}%",
|
||||||
|
Loading…
Reference in New Issue
Block a user