clippy: fix manual_swap

Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
ljedrz 2020-10-05 17:06:48 +02:00
parent fae079057d
commit 27c3d7b71b

View File

@ -95,9 +95,7 @@ impl Error {
fn underline(mut start: usize, mut end: usize) -> String { fn underline(mut start: usize, mut end: usize) -> String {
if start > end { if start > end {
let tmp = start; std::mem::swap(&mut start, &mut end)
start = end;
end = tmp;
} }
let mut underline = String::new(); let mut underline = String::new();