Skip to content

Commit

Permalink
fix the ordering of the keys in "not a table"
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Feb 17, 2024
1 parent 259a197 commit 8195365
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/nu/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,9 @@ pub(crate) fn is_table(value: &Value) -> Table {
}
},
None => {
return Table::RowInvalidKey(
i + 1,
key.clone(),
row.keys().cloned().collect(),
)
let mut keys = row.keys().cloned().collect::<Vec<String>>();
keys.sort();
return Table::RowInvalidKey(i + 1, key.clone(), keys);
}
}
}
Expand Down

0 comments on commit 8195365

Please sign in to comment.