You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust has several formatter traits, all of could be printed out (and likewise colored).
Currently this crate only provides a way to print via the Display trait - any formatting traits would have to be done via a method such as format!("{item:?}").blue(), which can get a bit clunky.
The proposed method to fix this is to allow any type to be formatted, as long as it implements the corresponding formatting type. I.e. if a type implements Debug, doing something like println!("{:?}", item.blue()) should work just fine.
owo-colors uses this method, and it's of my view that it's quite a good method of doing things. I think this crate should consider doing a similar approach for a v3, along with some other changes that people are requesting in this repository.
The text was updated successfully, but these errors were encountered:
Oh by the way, what are your thoughts on having a v3 @mackwic@kurtlawrence? I'd definitely like to get your guys' opinions before doing anything huge.
I was also thinking of moving the current codebase to a v2 branch and starting v3 work on master, which could allow some breaking PRs to start getting merged in. v3 wouldn't be published for a hot minute, it would just be in the codebase so people have a good place to start working on.
Yeah I like that idea @kurtlawrence, I think that'd be good to keep things smooth. I can look at some PRs tomorrow and try to slim them down, and then all the v3 stuff can get started.
Rust has several formatter traits, all of could be printed out (and likewise colored).
Currently this crate only provides a way to print via the
Display
trait - any formatting traits would have to be done via a method such asformat!("{item:?}").blue()
, which can get a bit clunky.The proposed method to fix this is to allow any type to be formatted, as long as it implements the corresponding formatting type. I.e. if a type implements
Debug
, doing something likeprintln!("{:?}", item.blue())
should work just fine.owo-colors
uses this method, and it's of my view that it's quite a good method of doing things. I think this crate should consider doing a similar approach for a v3, along with some other changes that people are requesting in this repository.The text was updated successfully, but these errors were encountered: