-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StyledObject does not implement Display #33
Comments
Yea It's a know problem unfortunately (if folks used the old API) allot has been changed and almost the whole API has been thrown over. It needed to be done and this crate had some crate benefits from it. If you have a few minutes I'll look into it. But am not sure there was a reason why I had removed it. I'll let you know... |
Oke I have been experimenting and have come up with something. I can't work further on it now need to go. But I see that this is something that needs to be implemented because it is quite useful to have this kind of functionality. Look at the code below of how I have implemented it for now:
This will wrap a And also implementing You could copy the code above for now but unfortunately, you still need to update 60 rows :( |
I think this will be the way to go: I will add another function so you do not need to create the
So now you can call it like this:
If you have any feedback or you don't like it please let me know. Otherwise tonight I'll release a new version. |
That looks pretty good to me! Thanks so much for the quick implementation of this @TimonPost |
I published the new version with the changes. So I'll close the issue. |
Upgrade went pretty smooth, thanks for the quick turnaround on this. |
I am trying to upgrade from 0.3 to 0.4 but got over 60 errors in my project due to the breaking changes. I do a lot of calls where I just want to have some part of the output colored and use the
println!
macro a lot.I was trying to update the code with as little change as possible and ended up with attempting this:
But that yields the following error
Any chance to implement
Display
? I don't really know how the library works so please forgive my ignorance. If this can't be done, I'll have to pull apart all of my print statements and squeezestyle()..paint(&screen)
between my print calls which definitely would be a huge pain. Maybe there's an easier way if you could guide me to one.The text was updated successfully, but these errors were encountered: