colored
colored copied to clipboard
Support storing coloured strings in other strings
I'd expected to be able to push a coloured string into another, but it loses the colour:
fn main() {
let mut s = String::with_capacity(5);
let msg = "blue";
s.push_str(&msg.blue());
println!("{}", msg.blue()); // works
println!("{}", s); // no colour
}
Is this supported?
Ooh, this works:
s.push_str(&msg.blue().to_string());
Perhaps mention this in the readme?
Thank for the issue, it's not clear indeed.
Where would you like it to be ? In an example ? As a special case in the readme ?
I think mentioning in it the readme would be sufficient :)
+1 for docs. Looked through issues for exactly this :+1:
I just ran into the same issue, v2.0.0. Seems like it could be prevented at the type level?