comparison with x.as_str() where x suffices #181
Labels
A-lint
Area: New lints
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
S-needs-discussion
Status: Needs further discussion before merging or work can be started
T-middle
Type: Probably requires verifiying types
We recently had some instances where we compared
name.as_str() == s
albeit there was animpl PartialEq<&str>
.I say this should either be allowed by default or use a blacklist of types where we know that the aforementioned impl has the same semantics as the conversion + str-equality.
The text was updated successfully, but these errors were encountered: