crosvm: silence unused code warning for NonZeroU8

After a recent refactoring of display support, this import is only used
when building with the "gpu" feature enabled. Put it behind a cfg check
to avoid a warning when building without gpu support.

BUG=None
TEST=cargo build
TEST=emerge-nami crosvm

Change-Id: I4e407e09daa93c74203f3472dad5a3713b99d122
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1762448
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel Verkamp 2019-08-20 09:41:22 -07:00 committed by Commit Bot
parent b7bee37759
commit 6f9215cecd

View file

@ -11,6 +11,7 @@ use std::fmt::{self, Display};
use std::fs::{File, OpenOptions};
use std::io::{self, stdin, Read};
use std::net::Ipv4Addr;
#[cfg(feature = "gpu")]
use std::num::NonZeroU8;
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
use std::os::unix::net::UnixStream;