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
Fixesrust-lang#9351.
Note that this commit reworks that fix for rust-lang#9317. The change
is to check that the type implements `AsRef<str>` before regarding
`to_string` as an equivalent of `to_owned`. This was suggested
by Jarcho in the rust-lang#9317 issue comments.
The benefit of this is that it moves some complexity out of
`check_other_call_arg` and simplifies the module as a whole.
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Sep 9, 2022
Fix `unnecessary_to_owned` false positive
Fixesrust-lang#9351.
Note that this commit reworks that fix for rust-lang#9317. The change
is to check that the type implements `AsRef<str>` before regarding
`to_string` as an equivalent of `to_owned`. This was suggested
by Jarcho in the rust-lang#9317 issue comments.
The benefit of this is that it moves some complexity out of
`check_other_call_arg` and simplifies the module as a whole.
changelog: FP: [`unnecessary_to_owned`]: No longer lints, if type change would cause errors in the caller function
nounwind
is separate, so I think this would be perfectly safe but likely not very usefulThe text was updated successfully, but these errors were encountered: