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
Extend `unnecessary_to_owned` to handle `Borrow` trait in map types
Fixes#8088.
Alternative to #12315.
r? `@y21`
changelog: Extend `unnecessary_to_owned` to handle `Borrow` trait in map types
What it does
Inspired also by:
rust-lang/rust#91626
In this code:
I'd like Clippy to suggest to avoid the string allocation:
Similar suggestions are useful to HashMap, etc.
Lint Name
useless_string_allocation
Category
pedantic
Advantage
No response
Drawbacks
No response
Example
<code>
Could be written as:
<code>
The text was updated successfully, but these errors were encountered: