diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2019-08-20 09:41:22 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-22 20:43:24 +0000 |
commit | 6f9215cecd81947cb5c42e5ad43e1470f7e4e802 (patch) | |
tree | be9d8890cd0a1d4f2c0e40478a004d0d0047c16d /src/linux.rs | |
parent | b7bee377593ffee4171fd89845e66c84c09b7388 (diff) | |
download | crosvm-6f9215cecd81947cb5c42e5ad43e1470f7e4e802.tar crosvm-6f9215cecd81947cb5c42e5ad43e1470f7e4e802.tar.gz crosvm-6f9215cecd81947cb5c42e5ad43e1470f7e4e802.tar.bz2 crosvm-6f9215cecd81947cb5c42e5ad43e1470f7e4e802.tar.lz crosvm-6f9215cecd81947cb5c42e5ad43e1470f7e4e802.tar.xz crosvm-6f9215cecd81947cb5c42e5ad43e1470f7e4e802.tar.zst crosvm-6f9215cecd81947cb5c42e5ad43e1470f7e4e802.zip |
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>
Diffstat (limited to 'src/linux.rs')
-rw-r--r-- | src/linux.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/linux.rs b/src/linux.rs index b579e8a..75b09b5 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -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; |