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 {
if start > end {
let tmp = start;
start = end;
end = tmp;
std::mem::swap(&mut start, &mut end)
}
let mut underline = String::new();