From 6646b21a15c968e1e24149c61b901b5248f3e8b3 Mon Sep 17 00:00:00 2001 From: Chartres Date: Tue, 8 Sep 2026 10:23:36 +0000 Subject: [PATCH 1/3] =?UTF-8?q?ci:=20rustfmt=20drift=20+=20run=20only=20cr?= =?UTF-8?q?iterion=20benches=20=E2=80=94=20main=20has=20been=20red=20since?= =?UTF-8?q?=20June?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two unrelated failures made every CI run red since the first commit: `cargo fmt --check` (menu.rs / lib.rs drifted from rustfmt) and the bench job, where `cargo bench --workspace -- --quick` also runs markdusk-app's lib unit tests under the libtest harness, which rejects `--quick` ("Unrecognized option"). `--benches` limits the job to the criterion targets (harness = false), which accept the flag. cargo fmt applied. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01RicgHjbdeNb3ZGA6DMYMfS --- .github/workflows/ci.yml | 2 +- crates/markdusk-app/src/lib.rs | 6 +++++- crates/markdusk-app/src/menu.rs | 16 ++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56c62ea..24111b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,4 +38,4 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - - run: cargo bench --workspace -- --quick + - run: cargo bench --workspace --benches -- --quick diff --git a/crates/markdusk-app/src/lib.rs b/crates/markdusk-app/src/lib.rs index 8ff75af..86eb98d 100644 --- a/crates/markdusk-app/src/lib.rs +++ b/crates/markdusk-app/src/lib.rs @@ -11,7 +11,11 @@ pub struct PendingOpens(pub Mutex>); #[tauri::command] fn drain_pending_opens(state: tauri::State<'_, PendingOpens>) -> Vec { - state.0.lock().map(|mut v| std::mem::take(&mut *v)).unwrap_or_default() + state + .0 + .lock() + .map(|mut v| std::mem::take(&mut *v)) + .unwrap_or_default() } pub fn run() { diff --git a/crates/markdusk-app/src/menu.rs b/crates/markdusk-app/src/menu.rs index defeabf..f5e8473 100644 --- a/crates/markdusk-app/src/menu.rs +++ b/crates/markdusk-app/src/menu.rs @@ -60,10 +60,10 @@ pub fn build(app: &AppHandle) -> tauri::Result> { .accelerator("CmdOrCtrl+Alt+F") .build(app)?; - let spell_check_item = MenuItemBuilder::with_id("edit:spell-check", "Toggle Spell Check") - .build(app)?; - let smart_punct_item = MenuItemBuilder::with_id("edit:smart-punct", "Toggle Smart Punctuation") - .build(app)?; + let spell_check_item = + MenuItemBuilder::with_id("edit:spell-check", "Toggle Spell Check").build(app)?; + let smart_punct_item = + MenuItemBuilder::with_id("edit:smart-punct", "Toggle Smart Punctuation").build(app)?; let edit_submenu = SubmenuBuilder::new(app, "Edit") .undo() @@ -104,10 +104,10 @@ pub fn build(app: &AppHandle) -> tauri::Result> { .item(&mode_vim) .build()?; - let focus_dim_paragraph = MenuItemBuilder::with_id("view:focus-dim:paragraph", "Paragraph") - .build(app)?; - let focus_dim_sentence = MenuItemBuilder::with_id("view:focus-dim:sentence", "Sentence") - .build(app)?; + let focus_dim_paragraph = + MenuItemBuilder::with_id("view:focus-dim:paragraph", "Paragraph").build(app)?; + let focus_dim_sentence = + MenuItemBuilder::with_id("view:focus-dim:sentence", "Sentence").build(app)?; let focus_dim_off = MenuItemBuilder::with_id("view:focus-dim:off", "Off").build(app)?; let focus_dim_submenu = SubmenuBuilder::new(app, "Focus Dim") .item(&focus_dim_paragraph) From 85b5074203b76c3678fb95aa265ed5bc634a6684 Mon Sep 17 00:00:00 2001 From: Chartres Date: Tue, 8 Sep 2026 10:30:52 +0000 Subject: [PATCH 2/3] clippy: collapse nested if in setup (collapsible_if under -D warnings) Same red run, third cause: clippy 1.90 flags the nested if in the launch-arg capture; edition 2024 let-chains make it one condition, no behaviour change. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01RicgHjbdeNb3ZGA6DMYMfS --- crates/markdusk-app/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/markdusk-app/src/lib.rs b/crates/markdusk-app/src/lib.rs index 86eb98d..0c049e5 100644 --- a/crates/markdusk-app/src/lib.rs +++ b/crates/markdusk-app/src/lib.rs @@ -39,10 +39,11 @@ pub fn run() { // Capture file paths from launch args (Finder double-click cold-start). let pending = app.state::(); for arg in std::env::args().skip(1) { - if !arg.starts_with('-') && std::path::Path::new(&arg).exists() { - if let Ok(mut v) = pending.0.lock() { - v.push(arg); - } + if !arg.starts_with('-') + && std::path::Path::new(&arg).exists() + && let Ok(mut v) = pending.0.lock() + { + v.push(arg); } } Ok(()) From e57ad1edfef9adec1bbdda194aa2a00c203e45f8 Mon Sep 17 00:00:00 2001 From: Chartres Date: Tue, 8 Sep 2026 10:36:23 +0000 Subject: [PATCH 3/3] ci: bench only the markdusk-bench crate --benches still includes every lib target with the default bench = true, so markdusk-app's unit tests ran under libtest and rejected --quick again. Scope the job to the crate that owns the criterion benches. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01RicgHjbdeNb3ZGA6DMYMfS --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24111b4..6cc3e98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,4 +38,4 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - - run: cargo bench --workspace --benches -- --quick + - run: cargo bench -p markdusk-bench --benches -- --quick