nushell/crates/nu-command/src/charting
Sygmei a1840e9d20
fix: fixed typo and improved Value TypeMismatch exceptions (#8324)
# Description

This PR aims to improve `TypeMismatch` exception that occurs when
comparing two values with `<`, `>`, `<=` or `>=` operators.

*Before*

![image](https://user-images.githubusercontent.com/3835355/222980803-8cb0f945-5a82-4512-9989-5df0ec4e4969.png)

*After*

![image](https://user-images.githubusercontent.com/3835355/226754903-68e56344-065d-42ee-b184-ab968e91c6de.png)

This PR also bundles a small refactor for histogram forbidden column
names exception, previous implementation forgot a column name in the
message, to avoid this, I'm re-using the same array for checking and
error display

# User-Facing Changes

Not much changes except a better and more readable exception for the
user

# Tests + Formatting

Does not break any tests, formatting passes as well :)
2023-03-22 09:47:40 +01:00
..
hashable_value.rs Optional members in cell paths: Attempt 2 (#8379) 2023-03-15 20:50:58 -07:00
histogram.rs fix: fixed typo and improved Value TypeMismatch exceptions (#8324) 2023-03-22 09:47:40 +01:00
mod.rs Implement histogram command (#5518) 2022-05-13 06:48:47 -05:00