crossterm-rs / crossterm

Cross platform terminal library rust
MIT License
3.28k stars 281 forks source link

Derive Hash for more style types #942

Open markus-bauer opened 1 week ago

markus-bauer commented 1 week ago

Color derives Hash:

https://github.com/crossterm-rs/crossterm/blob/45498314a58e7433ac9c5850589cac76de1419ef/src/style/types/color.rs#L30-L31

But most others don't: https://github.com/crossterm-rs/crossterm/blob/45498314a58e7433ac9c5850589cac76de1419ef/src/style/types/colors.rs#L29-L30 https://github.com/crossterm-rs/crossterm/blob/45498314a58e7433ac9c5850589cac76de1419ef/src/style/attributes.rs#L6-L7

...etc.

Can you add this, or is this by design?

joshka commented 1 day ago

Seems like a reasonable thing to add. Can you submit a PR?