mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
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:
parent
05485a91ee
commit
0fe970bd9a
1 changed files with 5 additions and 7 deletions
|
@ -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)?;
|
||||
|
||||
src_subslice.copy_to_volatile_slice(dst_subslice);
|
||||
} else if src_line_start_offset >= src_start_offset {
|
||||
next_src = true;
|
||||
next_line = false;
|
||||
} else {
|
||||
if src_line_start_offset >= src_start_offset {
|
||||
next_src = true;
|
||||
next_line = false;
|
||||
} else {
|
||||
next_src = false;
|
||||
next_line = true;
|
||||
}
|
||||
next_src = false;
|
||||
next_line = true;
|
||||
};
|
||||
|
||||
if next_src {
|
||||
|
|
Loading…
Reference in a new issue