Skip to content
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

Is there a to_string method? #44

Closed
hasezoey opened this issue Jan 5, 2020 · 1 comment
Closed

Is there a to_string method? #44

hasezoey opened this issue Jan 5, 2020 · 1 comment

Comments

@hasezoey
Copy link

hasezoey commented Jan 5, 2020

Is there something like a StyledObject.to_string() method?

for something like format!("{} hi", style("some string").dim()) - because "format!" will "throw" format argument must be a string literal

@mitsuhiko
Copy link
Collaborator

StyledObject implements Display which means it has a to_string method already.

Archina pushed a commit to Archina/console that referenced this issue Apr 5, 2021
dtolnay pushed a commit to dtolnay-contrib/console that referenced this issue Feb 4, 2022
dtolnay pushed a commit to dtolnay-contrib/console that referenced this issue Feb 4, 2022
this branch builds on console-rs#44 and adds waker stats to the console's task
view.

i also rearranged the task view a bit to make it a little more readable.
now, stats are grouped into boxes, and the fields are drawn on multiple
lines (which will be nice if we start recording user fields...).

for example:
![image](https://user-images.githubusercontent.com/2796466/121950547-a0721780-cd0e-11eb-89e3-f19e82391b2e.png)

also, i refactored a few things.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants