From c1984a200b56dcb9813e32fdeaf1065315e759d0 Mon Sep 17 00:00:00 2001 From: Sven Assmann Date: Mon, 23 May 2022 23:56:00 +0200 Subject: [PATCH] chore: make clippy happy --- src/linux/x11_api.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/linux/x11_api.rs b/src/linux/x11_api.rs index aca8f22..3db51c9 100644 --- a/src/linux/x11_api.rs +++ b/src/linux/x11_api.rs @@ -263,6 +263,7 @@ impl PlatformApi for X11Api { mod test { use super::*; use crate::utils::IMG_EXT; + use crate::Image; use image::flat::View; use image::{save_buffer, GenericImageView, Rgba}; @@ -271,11 +272,13 @@ mod test { let mut api = X11Api::new()?; let win = api.get_active_window()?; let image_raw = api.capture_window_screenshot(win)?; + let image_raw: &Image = image_raw.as_ref(); let image: View<_, Rgba> = image_raw.as_view().unwrap(); let (width, height) = image.dimensions(); api.calibrate(win)?; let image_calibrated_raw = api.capture_window_screenshot(win)?; + let image_calibrated_raw: &Image = image_calibrated_raw.as_ref(); let image_calibrated: View<_, Rgba> = image_calibrated_raw.as_view().unwrap(); let (width_new, height_new) = image_calibrated.dimensions(); dbg!(width, width_new, height, height_new); @@ -337,6 +340,7 @@ mod test { let api = X11Api::new()?; let win = api.get_active_window()?; let image_raw = api.capture_window_screenshot(win)?; + let image_raw: &Image = image_raw.as_ref(); let image: View<_, Rgba> = image_raw.as_view().unwrap(); let (width, height) = image.dimensions();