Closed
Description
Clippy(clippy 0.0.212 (3aea860 2019-09-03)) incorrectly suggests to use std::mem::swap
when trying to swap elements of a matrix across different rows. The lint is clippy::manual_swap
.
Here's a minimal example:
fn swap(a: &mut[Vec<u64>]) {
let tmp = a[0][1];
a[0][1] = a[1][0];
a[1][0] = tmp;
}