From f5c194a4c88c785562ca97640b2280d01fc8b704 Mon Sep 17 00:00:00 2001 From: Iain Laird Date: Sun, 12 May 2024 21:53:18 +0100 Subject: [PATCH] Formatting --- druid-shell/src/window.rs | 2 +- druid/src/widget/image.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/druid-shell/src/window.rs b/druid-shell/src/window.rs index 70280651a..e69e59ba9 100644 --- a/druid-shell/src/window.rs +++ b/druid-shell/src/window.rs @@ -31,7 +31,7 @@ use crate::scale::Scale; use crate::text::{Event, InputHandler}; use piet_common::PietText; #[cfg(feature = "raw-win-handle")] -use raw_window_handle::{HasWindowHandle, HandleError}; +use raw_window_handle::{HandleError, HasWindowHandle}; /// A token that uniquely identifies a running timer. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Hash)] diff --git a/druid/src/widget/image.rs b/druid/src/widget/image.rs index e4d30715e..04e3e4135 100644 --- a/druid/src/widget/image.rs +++ b/druid/src/widget/image.rs @@ -318,11 +318,8 @@ mod tests { // the padding color and the middle rows will not have any padding. // Check that the middle row 400 pix wide is 200 black then 200 white. - let expecting: Vec = [ - [0, 0, 0, 255].repeat(200), - [255, 255, 255, 255].repeat(200), - ] - .concat(); + let expecting: Vec = + [[0, 0, 0, 255].repeat(200), [255, 255, 255, 255].repeat(200)].concat(); assert_eq!(raw_pixels[400 * 300 * 4..400 * 301 * 4], expecting[..]); // Check that all of the last 100 rows are all the background color.