From 63a48114161237e75a753ef340bc5ef80e0db84e Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 16 Nov 2026 14:34:57 +0000 Subject: [PATCH] cargo fmt --- crates/automation/src/agents/settings.rs | 8 +++++++- crates/automation/src/ui/actions/mod.rs | 2 +- crates/automation/src/ui/agents/mod.rs | 3 ++- crates/behavior/src/wheel.rs | 18 ++++++++++++++---- crates/color/tests/it/panels.rs | 3 ++- crates/design-lint/src/workspace.rs | 4 ++-- crates/draw/src/ui/corner/mod.rs | 2 +- crates/draw/src/ui/mod.rs | 4 +++- crates/imaging/src/ui/adjust/hosted.rs | 7 +------ .../src/ui/transform_preview/textures.rs | 3 ++- crates/keymap/src/import/kys.rs | 3 ++- crates/text/tests/it/style_options.rs | 6 +----- crates/ui-canvas/tests/it/canvas/tool.rs | 6 +++++- crates/ui-canvas/tests/it/canvas/tools.rs | 5 ++++- .../src/primitives/pointer_art/art.rs | 2 +- crates/ui-contract/src/primitives/svg_set.rs | 2 +- .../ui-contract/src/runtime/keys/intents.rs | 2 +- .../ui-contract/tests/it/runtime/windows.rs | 3 ++- .../preferences/path_setting/stories.rs | 2 +- .../tests/it/form_dialogs/save_for_web.rs | 5 +---- .../tests/it/form_dialogs/size_model.rs | 6 +----- crates/ui-patterns/tests/it/panels/history.rs | 19 +++++++++---------- .../tests/it/preferences/path_setting.rs | 3 +-- .../ui-shell/tests/it/shell/caption_button.rs | 12 ++++++++++-- 24 files changed, 75 insertions(+), 55 deletions(-) diff --git a/crates/automation/src/agents/settings.rs b/crates/automation/src/agents/settings.rs index a2e9c9a32..1b5918759 100644 --- a/crates/automation/src/agents/settings.rs +++ b/crates/automation/src/agents/settings.rs @@ -24,7 +24,13 @@ pub struct AgentSettings { impl Default for AgentSettings { fn default() -> Self { - Self { allow_agent_control: true, control_port: 0, read_root: String::new(), write_root: String::new(), when_app_closed: WhenAppClosed::Launch } + Self { + allow_agent_control: true, + control_port: 0, + read_root: String::new(), + write_root: String::new(), + when_app_closed: WhenAppClosed::Launch, + } } } diff --git a/crates/automation/src/ui/actions/mod.rs b/crates/automation/src/ui/actions/mod.rs index db85a5e32..2b9ed4304 100644 --- a/crates/automation/src/ui/actions/mod.rs +++ b/crates/automation/src/ui/actions/mod.rs @@ -23,7 +23,7 @@ mod words; pub use body::{ActionMove, ActionPlace}; pub use menu::{ActionsMenuAction, ActionsMenuFacts, ActionsPanelCommands, panel_rows}; -pub use prompt::LibraryPrompt; pub use panel::{ActionSelection, ActionsEvent, ActionsHost, ActionsPanel, ActionsPanelOutput, ActionsPanelState, ActionsSettings, ShortcutChoice}; +pub use prompt::LibraryPrompt; pub use rows::{DIALOG_COLUMN, INCLUDE_COLUMN}; pub use words::ActionsWords; diff --git a/crates/automation/src/ui/agents/mod.rs b/crates/automation/src/ui/agents/mod.rs index 8da691c55..8b3859f7b 100644 --- a/crates/automation/src/ui/agents/mod.rs +++ b/crates/automation/src/ui/agents/mod.rs @@ -127,7 +127,8 @@ impl<'a> AgentsPage<'a> { for (name, label) in [("readRoot", &words.read_root), ("writeRoot", &words.write_root)] { let folder_key = key(name); - let out = PathSetting::new(label.clone(), &folder_key, draft, PickRequest::folder(PICK_PURPOSE)).placeholder(words.none.clone()).show(ui); + let out = + PathSetting::new(label.clone(), &folder_key, draft, PickRequest::folder(PICK_PURPOSE)).placeholder(words.none.clone()).show(ui); changed |= out.changed; browsing = browsing.or(out.browsing); } diff --git a/crates/behavior/src/wheel.rs b/crates/behavior/src/wheel.rs index fa6a6dee2..787737851 100644 --- a/crates/behavior/src/wheel.rs +++ b/crates/behavior/src/wheel.rs @@ -87,7 +87,19 @@ pub struct Wheel { impl Wheel { /// A scroll of `scroll` points with no zoom. pub const fn new(scroll: Vec2, mods: Mods, unit: WheelUnit, phase: WheelPhase) -> Self { - Wheel { scroll, zoom: 1.0, mods, unit, phase, source: WheelSource::Unknown, at: None, zooms: false, touch_zoom: 1.0, rotation: 0.0, touch_rotation: 0.0 } + Wheel { + scroll, + zoom: 1.0, + mods, + unit, + phase, + source: WheelSource::Unknown, + at: None, + zooms: false, + touch_zoom: 1.0, + rotation: 0.0, + touch_rotation: 0.0, + } } /// The same gesture with zoom factor `zoom`. @@ -495,9 +507,7 @@ fn split_at( under.sort_by(|a, b| a.rect.area().total_cmp(&b.rect.area())); // A trackpad steps a value control only while it is focused or armed: over anything else it scrolls the panel. let fingers = wheel.source.fingers(); - let open = |taker: &WheelTaker| { - (!taker.gated && !(fingers && taker.value)) || armed == Some(taker.owner) || focused == Some(taker.owner) - }; + let open = |taker: &WheelTaker| (!taker.gated && !(fingers && taker.value)) || armed == Some(taker.owner) || focused == Some(taker.owner); // The running gesture's owner, while it is registered and open; it takes its axes wherever the pointer is. A // focused field holds the wheel by the field rule alone, so a wheel with Alt or Cmd/Ctrl still reaches the view. let held: Option<&WheelTaker> = latch diff --git a/crates/color/tests/it/panels.rs b/crates/color/tests/it/panels.rs index f153a2d7c..7154b319b 100644 --- a/crates/color/tests/it/panels.rs +++ b/crates/color/tests/it/panels.rs @@ -388,7 +388,8 @@ fn the_info_panel_shows_the_rulers_measure_while_it_has_one() { assert_eq!(measure_names(Some(InfoMeasure::protractor("45.0°", "200.00", "141.42"))), [true, false, true, true], "a protractor: A, L1 and L2"); assert_eq!(measure_names(None), [false; 4], "no ruler, no measure names"); let mut fixture = Fixture::new(|ui| { - let readings = craft_color::ui::InfoReadings::new().measure(Some(InfoMeasure::protractor("45.0°", "200.00", "141.42"))).document(Some([640, 480])); + let readings = + craft_color::ui::InfoReadings::new().measure(Some(InfoMeasure::protractor("45.0°", "200.00", "141.42"))).document(Some([640, 480])); let _ = craft_color::ui::InfoPanel::new("Info", &readings).show(ui); }); fixture.settle(); diff --git a/crates/design-lint/src/workspace.rs b/crates/design-lint/src/workspace.rs index d16513b6b..8ef4a727b 100644 --- a/crates/design-lint/src/workspace.rs +++ b/crates/design-lint/src/workspace.rs @@ -27,8 +27,8 @@ const CLOSED: &[&str] = &[ "SetPosition", "States", "StateMix", - "ShowReadouts", // the one Show Transformation Values flag: a bool, fixed by meaning - "PenDraft", // whose anchors a pen draft holds: own or foreign, fixed by meaning + "ShowReadouts", // the one Show Transformation Values flag: a bool, fixed by meaning + "PenDraft", // whose anchors a pen draft holds: own or foreign, fixed by meaning "CollectionEvent", // built or matched in craft-ui-patterns "ColumnAlign", // built or matched in craft-ui-widgets "ColumnEvent", // built or matched in craft-ui-widgets diff --git a/crates/draw/src/ui/corner/mod.rs b/crates/draw/src/ui/corner/mod.rs index 0ce9a39ad..c4e163fed 100644 --- a/crates/draw/src/ui/corner/mod.rs +++ b/crates/draw/src/ui/corner/mod.rs @@ -15,8 +15,8 @@ mod words; use kurbo::Point; pub use style::CornerStyle; -pub use widgets::{CornerWidgets, CornerWidgetsOutput}; pub(crate) use widgets::paint_widget; +pub use widgets::{CornerWidgets, CornerWidgetsOutput}; pub use words::CornerWords; /// How a corner is cut. Only shown and cycled with [`CornerWidgets::kinds`] (VectorCraft). diff --git a/crates/draw/src/ui/mod.rs b/crates/draw/src/ui/mod.rs index cd45c5ddf..efaf39dce 100644 --- a/crates/draw/src/ui/mod.rs +++ b/crates/draw/src/ui/mod.rs @@ -82,7 +82,9 @@ pub use gradient::{ GradientGroup, GradientItem, GradientLine, GradientMap, GradientMapEditor, GradientMapOutput, GradientOverlay, GradientPalette, GradientRef, GradientSwatch, LineGradient, LinePart, }; -pub use measure::{MIN_LINE, RulerBar, RulerBarOutput, RulerLine, RulerOverlay, RulerPass, RulerTool, RulerWords, box_distances, ruler_line_form, show_ruler}; +pub use measure::{ + MIN_LINE, RulerBar, RulerBarOutput, RulerLine, RulerOverlay, RulerPass, RulerTool, RulerWords, box_distances, ruler_line_form, show_ruler, +}; pub use paint_bar::{ EraserMode, MIXER_COMBINATIONS, MIXER_GROUP_STARTS, MixerValues, PaintBar, PaintBarOutput, PaintBarWords, PaintTool, PaintValues, Smoothing, }; diff --git a/crates/imaging/src/ui/adjust/hosted.rs b/crates/imaging/src/ui/adjust/hosted.rs index 79098d2e8..9f4e55536 100644 --- a/crates/imaging/src/ui/adjust/hosted.rs +++ b/crates/imaging/src/ui/adjust/hosted.rs @@ -57,12 +57,7 @@ pub struct AdjustDialogCx<'a> { impl<'a> AdjustDialogCx<'a> { /// The context for an editor shown in `context` over the dialog's own `picker`, `channel` and `clipping` state, with /// no canvas, no curve point to select and no edit phase; the fields set the rest. - pub fn new( - context: AdjustContext, - picker: &'a mut Option, - channel: &'a mut usize, - clipping: &'a mut Option, - ) -> Self { + pub fn new(context: AdjustContext, picker: &'a mut Option, channel: &'a mut usize, clipping: &'a mut Option) -> Self { Self { context, canvas: None, picker, channel, select_point: None, clipping, edit: None } } } diff --git a/crates/imaging/src/ui/transform_preview/textures.rs b/crates/imaging/src/ui/transform_preview/textures.rs index a2ee003f5..a15e6e62f 100644 --- a/crates/imaging/src/ui/transform_preview/textures.rs +++ b/crates/imaging/src/ui/transform_preview/textures.rs @@ -6,7 +6,8 @@ use std::sync::{Arc, Mutex, PoisonError}; use craft_host::queue::Cancel; use craft_ui::primitives::{ - LoadFailure, LoadResult, LoadedPicture, LoaderOptions, Priority, Revision, TextureLoader, TextureState, TextureStatistics, TextureStore, TextureStoreOptions, + LoadFailure, LoadResult, LoadedPicture, LoaderOptions, Priority, Revision, TextureLoader, TextureState, TextureStatistics, TextureStore, + TextureStoreOptions, }; use egui::{Color32, ColorImage, Context, TextureId, TextureOptions}; diff --git a/crates/keymap/src/import/kys.rs b/crates/keymap/src/import/kys.rs index b06eedd94..4f29bc8a0 100644 --- a/crates/keymap/src/import/kys.rs +++ b/crates/keymap/src/import/kys.rs @@ -96,7 +96,8 @@ pub fn read(text: &str) -> Result { return Err(KysError::TooLarge); } let text = text.trim_start_matches('\u{feff}'); - let options = Options { limits: Limits { max_depth: MAX_DEPTH, ..Limits::DEFAULT }, doctype: Doctype::Reject, strict: true, ..Options::default() }; + let options = + Options { limits: Limits { max_depth: MAX_DEPTH, ..Limits::DEFAULT }, doctype: Doctype::Reject, strict: true, ..Options::default() }; let mut events = options.events(text.as_bytes()); let not_a_set = |e: craft_xml::Error| KysError::NotASet(e.to_string()); let (mut depth, mut rooted, mut set_name) = (0_usize, false, None); diff --git a/crates/text/tests/it/style_options.rs b/crates/text/tests/it/style_options.rs index eedd0c48c..3d05b3d19 100644 --- a/crates/text/tests/it/style_options.rs +++ b/crates/text/tests/it/style_options.rs @@ -34,9 +34,5 @@ fn a_row_left_out_of_the_style_takes_no_input_and_its_check_includes_it() { let include = fixture.by_label("Include Font size").expect("the include check is shown"); fixture.click(&include).idle(4); - assert_eq!( - changes(&edits), - vec![StyleOptionsChange::include(StyleAttribute::Size, true)], - "the check of a row that is not included includes it" - ); + assert_eq!(changes(&edits), vec![StyleOptionsChange::include(StyleAttribute::Size, true)], "the check of a row that is not included includes it"); } diff --git a/crates/ui-canvas/tests/it/canvas/tool.rs b/crates/ui-canvas/tests/it/canvas/tool.rs index 56a44a95d..96657f782 100644 --- a/crates/ui-canvas/tests/it/canvas/tool.rs +++ b/crates/ui-canvas/tests/it/canvas/tool.rs @@ -1313,6 +1313,10 @@ fn readout_during_a_drag(hud: bool, shown: Option) -> (bool, bool) { #[trial] fn show_transformation_values_gates_the_readouts_paint_and_never_the_hud() { assert_eq!(readout_during_a_drag(false, None), (true, true), "by default a tool's readout paints and is reported"); - assert_eq!(readout_during_a_drag(false, Some(false)), (false, true), "Show Transformation Values off: nothing paints, the rows are still reported"); + assert_eq!( + readout_during_a_drag(false, Some(false)), + (false, true), + "Show Transformation Values off: nothing paints, the rows are still reported" + ); assert_eq!(readout_during_a_drag(true, Some(false)), (true, true), "a hud paints with Show Transformation Values off"); } diff --git a/crates/ui-canvas/tests/it/canvas/tools.rs b/crates/ui-canvas/tests/it/canvas/tools.rs index 094c8b662..d210ac082 100644 --- a/crates/ui-canvas/tests/it/canvas/tools.rs +++ b/crates/ui-canvas/tests/it/canvas/tools.rs @@ -289,7 +289,10 @@ fn the_rotate_commands_step_fifteen_degrees_on_screen_in_a_flipped_view_too() { let mut view = before; assert!(command.apply(&mut view, &target, 1.0), "{command:?} turns the view"); let turned_by = (angle(&view) - angle(&before) + 540.0).rem_euclid(360.0) - 180.0; - assert!((turned_by - screen_turn).abs() < 0.01, "flip {flip_x}: {command:?} turns the image {screen_turn} degrees on screen, got {turned_by}"); + assert!( + (turned_by - screen_turn).abs() < 0.01, + "flip {flip_x}: {command:?} turns the image {screen_turn} degrees on screen, got {turned_by}" + ); } } } diff --git a/crates/ui-contract/src/primitives/pointer_art/art.rs b/crates/ui-contract/src/primitives/pointer_art/art.rs index 8d887aeed..6e4a230a4 100644 --- a/crates/ui-contract/src/primitives/pointer_art/art.rs +++ b/crates/ui-contract/src/primitives/pointer_art/art.rs @@ -3,8 +3,8 @@ use crate::primitives::SvgIcon; use crate::runtime::cursor::{CursorArt, CursorBitmap}; -use egui::{Color32, Painter, Pos2, Rect, Shape, Stroke, Vec2}; use craft_svg::tree::draw::tiny_skia; +use egui::{Color32, Painter, Pos2, Rect, Shape, Stroke, Vec2}; use std::sync::Arc; /// How far past a mark's geometry its antialiasing reaches, in device pixels. diff --git a/crates/ui-contract/src/primitives/svg_set.rs b/crates/ui-contract/src/primitives/svg_set.rs index a08f2ab4d..373025ae3 100644 --- a/crates/ui-contract/src/primitives/svg_set.rs +++ b/crates/ui-contract/src/primitives/svg_set.rs @@ -1,7 +1,7 @@ //! The SVG icon catalog the build embeds, the app icon sets registered beside it, and their rasteriser. -use egui::{Color32, ColorImage}; use craft_svg::tree::draw::{self as svg_draw, tiny_skia}; +use egui::{Color32, ColorImage}; use std::sync::{PoisonError, RwLock}; use super::svg_tree; diff --git a/crates/ui-contract/src/runtime/keys/intents.rs b/crates/ui-contract/src/runtime/keys/intents.rs index 29bd646cc..966fde965 100644 --- a/crates/ui-contract/src/runtime/keys/intents.rs +++ b/crates/ui-contract/src/runtime/keys/intents.rs @@ -1,7 +1,7 @@ //! The intents routed to a component and what it leaves untaken: Submit, Cancel, Escape and context requests. -use super::{Stage, current}; use super::route::push; +use super::{Stage, current}; use crate::runtime::focus::{self}; use craft_behavior::focus::{EscapeFacts, EscapeStep, escape_step}; use craft_behavior::{AccessRequest, CancelRule, EditCommand, EditorInput, Intent, MoveMods, NavMove, PartRef}; diff --git a/crates/ui-contract/tests/it/runtime/windows.rs b/crates/ui-contract/tests/it/runtime/windows.rs index 130a367b2..f53a8b841 100644 --- a/crates/ui-contract/tests/it/runtime/windows.rs +++ b/crates/ui-contract/tests/it/runtime/windows.rs @@ -288,7 +288,8 @@ fn a_full_window_viewport_fills_the_main_window_without_viewports_and_opens_its_ /// in, and the dialog stays open. #[trial] fn a_viewport_mount_stays_in_a_full_screen_or_wayland_maximized_window() { - let state = |fullscreen: bool, maximized: bool| ViewportInfo { fullscreen: Some(fullscreen), maximized: Some(maximized), ..ViewportInfo::default() }; + let state = + |fullscreen: bool, maximized: bool| ViewportInfo { fullscreen: Some(fullscreen), maximized: Some(maximized), ..ViewportInfo::default() }; let frame = |windows: &Windows| { windows.frame(vec![], vec![], |ui| { Palette::full_window("Workspace").show(ui, |_, _| {}); diff --git a/crates/ui-patterns/src/patterns/preferences/path_setting/stories.rs b/crates/ui-patterns/src/patterns/preferences/path_setting/stories.rs index 61eedcd58..8dee61dd5 100644 --- a/crates/ui-patterns/src/patterns/preferences/path_setting/stories.rs +++ b/crates/ui-patterns/src/patterns/preferences/path_setting/stories.rs @@ -2,8 +2,8 @@ use super::PathSetting; use crate::patterns::preferences::SettingsDraft; -use craft_host::PickRequest; use crate::testing::{Drive, StoryData, StoryOutput, story}; +use craft_host::PickRequest; use egui::Ui; fn draft(path: &str) -> SettingsDraft { diff --git a/crates/ui-patterns/tests/it/form_dialogs/save_for_web.rs b/crates/ui-patterns/tests/it/form_dialogs/save_for_web.rs index bbec542de..d98d0be65 100644 --- a/crates/ui-patterns/tests/it/form_dialogs/save_for_web.rs +++ b/crates/ui-patterns/tests/it/form_dialogs/save_for_web.rs @@ -31,10 +31,7 @@ fn texture() -> SizedTexture { /// Two side-by-side slices, 1 on the left half and 2 on the right. fn slices() -> Vec { - [(1, 0.0), (2, 100.0)] - .into_iter() - .map(|(number, left)| WebSlice::new(number, Rect::from_min_size(pos2(left, 0.0), vec2(100.0, 100.0)))) - .collect() + [(1, 0.0), (2, 100.0)].into_iter().map(|(number, left)| WebSlice::new(number, Rect::from_min_size(pos2(left, 0.0), vec2(100.0, 100.0)))).collect() } /// A host running `web` every pass, in a room large enough for the dialog. diff --git a/crates/ui-patterns/tests/it/form_dialogs/size_model.rs b/crates/ui-patterns/tests/it/form_dialogs/size_model.rs index 6b0a402e8..eda36ca8c 100644 --- a/crates/ui-patterns/tests/it/form_dialogs/size_model.rs +++ b/crates/ui-patterns/tests/it/form_dialogs/size_model.rs @@ -116,11 +116,7 @@ fn relative_columns() { /// A degenerate or negative column size falls back to 180 pt / 12 pt, a negative gutter counts as none. fn degenerate_column_sizes() { - let degenerate = [ - ColumnSize::new(0.0, f64::NAN), - ColumnSize::new(f64::NAN, f64::INFINITY), - ColumnSize::new(-5.0, f64::NAN), - ]; + let degenerate = [ColumnSize::new(0.0, f64::NAN), ColumnSize::new(f64::NAN, f64::INFINITY), ColumnSize::new(-5.0, f64::NAN)]; for column_size in degenerate { let mut size = document().column_size(column_size); assert!(size.set_width_unit(UnitKind::Columns)); diff --git a/crates/ui-patterns/tests/it/panels/history.rs b/crates/ui-patterns/tests/it/panels/history.rs index 745ce05b2..394a2cce7 100644 --- a/crates/ui-patterns/tests/it/panels/history.rs +++ b/crates/ui-patterns/tests/it/panels/history.rs @@ -14,16 +14,15 @@ fn rig(source: Option, with_source: bool) -> (Fixture, Seen) { let seen: Seen = Rc::new(RefCell::new(Vec::new())); let sink = seen.clone(); let rows = vec![HistoryRow::state(1, "Open"), HistoryRow::state(2, "Brush"), HistoryRow::state(3, "Fill"), HistoryRow::snapshot(7, "Snapshot 1")]; - let fixture = - Fixture::new(move |ui| { - let mut panel = HistoryPanel::new(&rows, Some(HistoryKey::State(2))) - .can_delete(|key| *key != HistoryKey::State(1)) - .footer(HistoryFooter::default().delete(true)); - if with_source { - panel = panel.source(source); - } - sink.borrow_mut().extend(panel.show(ui).events); - }); + let fixture = Fixture::new(move |ui| { + let mut panel = HistoryPanel::new(&rows, Some(HistoryKey::State(2))) + .can_delete(|key| *key != HistoryKey::State(1)) + .footer(HistoryFooter::default().delete(true)); + if with_source { + panel = panel.source(source); + } + sink.borrow_mut().extend(panel.show(ui).events); + }); (fixture, seen) } diff --git a/crates/ui-patterns/tests/it/preferences/path_setting.rs b/crates/ui-patterns/tests/it/preferences/path_setting.rs index e62773a82..b9cb2b55e 100644 --- a/crates/ui-patterns/tests/it/preferences/path_setting.rs +++ b/crates/ui-patterns/tests/it/preferences/path_setting.rs @@ -61,8 +61,7 @@ fn a_path_setting_writes_the_picked_folder_into_its_draft_entry() { }); fixture.host(Arc::new(Host::builder(AppInfo { id: "test", name: "Test", version: "1.0" }).files(files.clone()).build())); fixture.settle(); - let browse: Vec<_> = - fixture.by_role(Role::BUTTON).into_iter().filter(|button| fixture.tree().name_of(button.node) == Some("Browse…")).collect(); + let browse: Vec<_> = fixture.by_role(Role::BUTTON).into_iter().filter(|button| fixture.tree().name_of(button.node) == Some("Browse…")).collect(); assert_eq!(browse.len(), 2, "one Browse per entry"); fixture.click(&browse[1]); fixture.settle(); diff --git a/crates/ui-shell/tests/it/shell/caption_button.rs b/crates/ui-shell/tests/it/shell/caption_button.rs index c12c9d388..517eb2eb9 100644 --- a/crates/ui-shell/tests/it/shell/caption_button.rs +++ b/crates/ui-shell/tests/it/shell/caption_button.rs @@ -32,9 +32,17 @@ fn hostile_svgs_render_nothing() { /// Icons parse on the UI thread: a document nested deeper than its stack takes is refused, not a stack overflow. #[trial] fn an_icon_nested_past_its_depth_is_refused_not_a_crash() { - let deep = format!(r#"{}{}"#, "".repeat(200), "".repeat(200)); + let deep = format!( + r#"{}{}"#, + "".repeat(200), + "".repeat(200) + ); assert!(mask_of(deep.as_bytes(), GLYPH_PX).is_none()); - let shallow = format!(r#"{}{}"#, "".repeat(8), "".repeat(8)); + let shallow = format!( + r#"{}{}"#, + "".repeat(8), + "".repeat(8) + ); assert!(mask_of(shallow.as_bytes(), GLYPH_PX).is_some_and(|mask| mask.iter().any(|coverage| *coverage > 0)), "a shallow icon draws"); }