Rust

Rust

Made by DeepSource

Found explicit self-assignment RS-W1013

Bug risk
Major

Self-assignments are redundant and are unlikely to be intentional. This is probably the result of a copy-paste.

Consider revisiting the code, self-assignments are silent bugs.

Bad practice

a.x = b.x;
a.y = a.y; // self-assignment

Recommended

a.x = b.x;
a.y = b.y;