blob: cd10a8d5409b10afab8778ac88d91e4e5bbdbbfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
### What it does
Checks for `foo = bar; bar = foo` sequences.
### Why is this bad?
This looks like a failed attempt to swap.
### Example
```
a = b;
b = a;
```
If swapping is intended, use `swap()` instead:
```
std::mem::swap(&mut a, &mut b);
```
|