![]() This is not a "proper" fix as it simply get rid of the warning altogether (whether you use or not the destructured values). The reason for removing the warning entirely is because (1) it's simpler, but more so (2) there's no impact on the final code produced _anyway_. Redundant let bindings are already removed by the compiler; and while it's an implicit behaviour that requires a proper warning when it's coming from a user-defined assignment; here the redundant assignment is introduced by the compiler to begin with as another implicit behavior! So we have an implicit behaviour triggering a warning on another implicit behaviour. Truth is, there's no impact in having those parameters destructured and unused. So since users are already not aware that this results in an implicit let assignment being inserted in place for them; there's no need for the warning at all. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
build.rs |