crossterm-rs / crossterm

Cross platform terminal library rust
MIT License
3.29k stars 280 forks source link

Feature Request: Implement `Debug` trait for `crossterm::cursor::SetCursorStyle`? #902

Closed linrongbin16 closed 2 months ago

linrongbin16 commented 4 months ago

Is your feature request related to a problem? Please describe.

I want to print debugging info for struct that contains the crossterm::cursor::SetCursorStyle enum, but it doesn't implement the Debug trait.

Describe the solution you'd like

Implement Debug trait for crossterm::cursor::SetCursorStyle.

Describe alternatives you've considered if any

N/A.

Additional context

Source code here: https://github.com/crossterm-rs/crossterm/blob/33b4e37223cff704fc81d683386742066f73619b/src/cursor.rs#L374

BTW, would you accept a PR for this? I think just add Debug to the #[derive] and add a unit test should work.

linrongbin16 commented 2 months ago

Resolved by: #909