mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
Fix compiling warnings in test code
This change fixes two small warnings in smoke test: Compiling crosvm_plugin v0.17.0 (/platform/crosvm/crosvm_plugin) warning: unused import: `std::mem::size_of` --> devices/src/virtio/input/event_source.rs:292:9 | 292 | use std::mem::size_of; | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unused_imports)] on by default warning: variable does not need to be mutable --> devices/src/virtio/input/event_source.rs:385:13 | 385 | let mut evt_opt = source.pop_available_event(); | ----^^^^^^^ | | | help: remove this `mut` | = note: #[warn(unused_mut)] on by default Compiling arch v0.1.0 (/platform/crosvm/arch) BUG=None TEST=./wrapped_smoke_test.sh Pass smoke test. The 2 warnings disappear in the output. Change-Id: Ib4de48e9586e80087e30411e225265554d5e7a11 Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1742921 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
0f2cfb095d
commit
b600dd5bec
1 changed files with 1 additions and 2 deletions
|
@ -289,7 +289,6 @@ mod tests {
|
|||
use std::cmp::min;
|
||||
use std::io::Read;
|
||||
use std::io::Write;
|
||||
use std::mem::size_of;
|
||||
|
||||
struct SourceMock {
|
||||
events: Vec<u8>,
|
||||
|
@ -382,7 +381,7 @@ mod tests {
|
|||
evts.len(),
|
||||
"should receive all events"
|
||||
);
|
||||
let mut evt_opt = source.pop_available_event();
|
||||
let evt_opt = source.pop_available_event();
|
||||
assert_eq!(evt_opt.is_some(), true, "event should have been poped");
|
||||
let evt = evt_opt.unwrap();
|
||||
assert_events_match(&evt, &evts[0]);
|
||||
|
|
Loading…
Reference in a new issue