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's pretty easy as a newbie to use to_vec on, for example, a boxed slice, when into_vec would be possible. These functions have very similar names and it's not immediately clear which one is correct (especially since the type mismatch compiler hints recommend both). It would be great if there was a lint to recommend into_* conversions when a to_* conversion is used on a type that is not used afterwards. This is based on an issue found in the Parity codebase, where to_vec was being used on boxed slices and causing unnecessary cloning.
The text was updated successfully, but these errors were encountered:
It's pretty easy as a newbie to use
to_vec
on, for example, a boxed slice, wheninto_vec
would be possible. These functions have very similar names and it's not immediately clear which one is correct (especially since the type mismatch compiler hints recommend both). It would be great if there was a lint to recommendinto_*
conversions when ato_*
conversion is used on a type that is not used afterwards. This is based on an issue found in the Parity codebase, whereto_vec
was being used on boxed slices and causing unnecessary cloning.The text was updated successfully, but these errors were encountered: