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 makes a lot of sense to add #[must_use] for methods in the Colorize trait.
I discovered It funnily by writing this code:
fn foo(s: &mut str) {
// ...
s.clear();
}
Of course, I should have used &mut String for my mutable buffer. But this compiled just fine since it calls Colorized::clear. With #[must_use], it would be easier to spot.
Even without this example, I think #[must_use] is a viable addition.