From c867b4e079177467f938e53b62bfab5e2b6a4840 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 29 Jul 2021 19:44:34 -0700 Subject: [PATCH] window: fix warning when buildings tests on !macos --- window/examples/wgpu.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/window/examples/wgpu.rs b/window/examples/wgpu.rs index d90d11b35..edbb39e8e 100644 --- a/window/examples/wgpu.rs +++ b/window/examples/wgpu.rs @@ -181,8 +181,11 @@ impl MyWindow { Ok(()) } + #[cfg(not(target_os = "macos"))] + fn fix_transparency(&mut self, _: &Window) {} + + #[cfg(target_os = "macos")] fn fix_transparency(&mut self, win: &Window) { - #[cfg(target_os = "macos")] if let RawWindowHandle::MacOS(h) = win.raw_window_handle() { use cocoa::base::{id, NO}; use objc::*;