From f9b74bfa18e931ff42800b4899961ff648e0b33f Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Tue, 21 Jun 2022 14:32:04 +0900 Subject: [PATCH] crosvm: fix build with --no-default-feature Fix a warning that would prevent `presubmit --all` to pass. BUG=None TEST=cargo build --verbose --no-default-features Change-Id: Iff80e5dd49b284cf20c2dd119d0b985317962a54 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3715086 Reviewed-by: Junichi Uekawa Tested-by: kokoro Commit-Queue: Alexandre Courbot Reviewed-by: Keiichi Watanabe --- src/crosvm/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crosvm/config.rs b/src/crosvm/config.rs index f9d11ca658..79bcbb1e1d 100644 --- a/src/crosvm/config.rs +++ b/src/crosvm/config.rs @@ -333,6 +333,7 @@ impl TouchDeviceOption { /// When a user specifies the parameters for a touch device, width and height are optional. /// If the width and height are missing, default values are used. Default values can be set /// dynamically, for example from the display sizes specified by the gpu argument. + #[cfg(feature = "gpu")] pub fn set_default_size(&mut self, width: u32, height: u32) { self.default_width = width; self.default_height = height;