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
It would be nice to be able to add ColoredString instances together, so that something like "blue".blue() + "red".red() could be done. It would also be nice to add normal strings as well (i.e. "blue".blue() + "|" + "red".red()).
I'm not sure how this would work with #139 when mixing different formatter types though.
The text was updated successfully, but these errors were encountered:
This will be added after #139 gets implemented, and the plan is to only allow it to function when T: impl Display. This is due to some limitations in Rust's trait system which wouldn't allow for multiple impl definitions (Rust wouldn't know what to call for Add if T implemented both Display and Debug).
To support multiple colored strings while still being able to get their sources, a Vec of some sort would have to be kept internally to keep track of all the strings, and it looks like the heapless crate would provide for that need just fine for no_std environments.
It would be nice to be able to add
ColoredString
instances together, so that something like"blue".blue() + "red".red()
could be done. It would also be nice to add normal strings as well (i.e."blue".blue() + "|" + "red".red()
).I'm not sure how this would work with #139 when mixing different formatter types though.
The text was updated successfully, but these errors were encountered: