chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
69 stars 16 forks source link

[#98] changed all formatting functions so they accept a type that implements Display #100

Closed MitchellBerend closed 1 year ago

MitchellBerend commented 1 year ago

Resolves #98

This pr converts all functions that accept &str to print them out to stdout/err to accept any type that implements Display in its stead. This allows these functions to not care about the implementation of the actual print formatting and leaves that up to the implementation of whatever needs to be printed.

Additional tasks

MitchellBerend commented 1 year ago

Im not sure what tests I could add here, I haven't actually verified that the tests that are run and succeed actually cover this refactor fully. There .to_string call in a test is still required for conversion sake.