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
No, it is different. The useless_format hint is where the X is a string; I'm talking about when it isn't a string but does have a to_string() method, e.g., an i32.
What it does
Since many types support
to_string()
ifformat!
is being used just to produce a string version then surely callingto_string()
is better?Lint Name
Convert an item to a string
Category
style
Advantage
I assume that this would be more efficient. It looks nicer too.
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: