mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
kernel_loader: simplify match of empty buf
Fixes a clippy warning in Rust 1.77. BUG=b:344974550 TEST=tools/clippy Change-Id: I05ce1a304943e56d03544169558e5012e6c04eb8 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5609080 Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
90a10c419e
commit
7d2280f04e
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ fn load_arm64_kernel_from_reader<F: BufRead>(
|
|||
.ok_or(Error::InvalidKernelSize)?;
|
||||
loop {
|
||||
let buf = match kernel_image.fill_buf() {
|
||||
Ok(buf) if buf.is_empty() => break,
|
||||
Ok([]) => break,
|
||||
Ok(buf) => buf,
|
||||
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => continue,
|
||||
Err(_) => return Err(Error::ReadKernelImage),
|
||||
|
|
Loading…
Reference in a new issue