From e95c7ad8552038bc263a4edd100f5e69f842007f Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Mon, 9 Nov 2020 00:26:41 -0800 Subject: [PATCH] Fix compiler warning by moving x86-64 specific variable into the guard --- window/src/bitmaps/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/window/src/bitmaps/mod.rs b/window/src/bitmaps/mod.rs index 7073c764b..777e7e9fa 100644 --- a/window/src/bitmaps/mod.rs +++ b/window/src/bitmaps/mod.rs @@ -247,10 +247,9 @@ pub trait BitmapImage { /// Clear the entire image to the specific color fn clear(&mut self, color: Color) { - let (width, height) = self.image_dimensions(); - #[cfg(target_arch = "x86_64")] { + let (width, height) = self.image_dimensions(); if is_x86_feature_detected!("avx") && width >= 8 { unsafe { avx::fill_pixel(self.pixel_data_mut(), width * 4, width, height, color);