pleco-rs / Pleco

A Rust-based re-write of the Stockfish Chess Engine
https://crates.io/crates/pleco
GNU General Public License v3.0
358 stars 38 forks source link

Implement Display for several structs #134

Closed MakotoE closed 1 year ago

MakotoE commented 3 years ago

It's not good practice to create a to_string() method because it shadows the function of the same name that is created by Display. I implemented Display for the affected structs as well as use the write!() macro to make it non-allocating.

chase-manning commented 1 year ago

Thanks so much for the PR!

Sorry this wasn't looked at earlier, the project was not under active maintenance at the time. This PR is a bit stale now and has some merge conflicts, but I have reimplemented the suggestion here #144