rutabaga_gfx: collapse nested if in else block

Fixes a new clippy warning ("this `else { if .. }` block can be
collapsed").

https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if

BUG=None
TEST=bin/clippy

Change-Id: Ib8a080a9afc39c272936012c9c1ecb92862e4189
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2864368
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Daniel Verkamp 2021-04-30 13:28:22 -07:00 committed by Commit Bot
parent 05485a91ee
commit 0fe970bd9a

View file

@ -107,14 +107,12 @@ pub fn transfer_2d<'a, S: Iterator<Item = VolatileSlice<'a>>>(
let dst_subslice = dst.get_slice(dst_start_offset as usize, copyable_size as usize)?; let dst_subslice = dst.get_slice(dst_start_offset as usize, copyable_size as usize)?;
src_subslice.copy_to_volatile_slice(dst_subslice); src_subslice.copy_to_volatile_slice(dst_subslice);
} else if src_line_start_offset >= src_start_offset {
next_src = true;
next_line = false;
} else { } else {
if src_line_start_offset >= src_start_offset { next_src = false;
next_src = true; next_line = true;
next_line = false;
} else {
next_src = false;
next_line = true;
}
}; };
if next_src { if next_src {