Skip to content

Commit c1984a2

Browse files
committed
chore: make clippy happy
1 parent 47d619d commit c1984a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/linux/x11_api.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ impl PlatformApi for X11Api {
263263
mod test {
264264
use super::*;
265265
use crate::utils::IMG_EXT;
266+
use crate::Image;
266267
use image::flat::View;
267268
use image::{save_buffer, GenericImageView, Rgba};
268269

@@ -271,11 +272,13 @@ mod test {
271272
let mut api = X11Api::new()?;
272273
let win = api.get_active_window()?;
273274
let image_raw = api.capture_window_screenshot(win)?;
275+
let image_raw: &Image = image_raw.as_ref();
274276
let image: View<_, Rgba<u8>> = image_raw.as_view().unwrap();
275277
let (width, height) = image.dimensions();
276278

277279
api.calibrate(win)?;
278280
let image_calibrated_raw = api.capture_window_screenshot(win)?;
281+
let image_calibrated_raw: &Image = image_calibrated_raw.as_ref();
279282
let image_calibrated: View<_, Rgba<u8>> = image_calibrated_raw.as_view().unwrap();
280283
let (width_new, height_new) = image_calibrated.dimensions();
281284
dbg!(width, width_new, height, height_new);
@@ -337,6 +340,7 @@ mod test {
337340
let api = X11Api::new()?;
338341
let win = api.get_active_window()?;
339342
let image_raw = api.capture_window_screenshot(win)?;
343+
let image_raw: &Image = image_raw.as_ref();
340344
let image: View<_, Rgba<u8>> = image_raw.as_view().unwrap();
341345
let (width, height) = image.dimensions();
342346

0 commit comments

Comments
 (0)