From 158642d4ce2220eff9e0f9b45bbdb4a218b3a1d0 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 30 Aug 2026 10:50:51 +0200 Subject: [PATCH] Reflow the accessibility test the way rustfmt wants it The author could not run cargo; this is the formatter's first pass. Co-Authored-By: Claude Opus 5 (1M context) --- ui/dr-ui/tests/ui_controls_are_accessible.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ui/dr-ui/tests/ui_controls_are_accessible.rs b/ui/dr-ui/tests/ui_controls_are_accessible.rs index 44141bf..33796ee 100644 --- a/ui/dr-ui/tests/ui_controls_are_accessible.rs +++ b/ui/dr-ui/tests/ui_controls_are_accessible.rs @@ -57,12 +57,20 @@ const PROMISES: &[Promise] = &[ Promise { file: "widgets.slint", component: "Button", - properties: &["accessible-role", "accessible-label", "accessible-action-default"], + properties: &[ + "accessible-role", + "accessible-label", + "accessible-action-default", + ], }, Promise { file: "widgets.slint", component: "IconButton", - properties: &["accessible-role", "accessible-label", "accessible-action-default"], + properties: &[ + "accessible-role", + "accessible-label", + "accessible-action-default", + ], }, Promise { file: "widgets.slint", @@ -144,9 +152,8 @@ fn read(path: &Path) -> String { /// file": the point is that a property found for `Button` really is inside /// `Button` and not inside the component below it. fn component_body<'a>(source: &'a str, name: &str) -> Option<&'a str> { - let header_starts = |line: &str| { - line.starts_with("component ") || line.starts_with("export component ") - }; + let header_starts = + |line: &str| line.starts_with("component ") || line.starts_with("export component "); let mut start = None; for (offset, line) in line_offsets(source) {