Skip to content

Desktop: fix macos clippy regression from #324#325

Merged
ericflo merged 1 commit intomainfrom
desktop-v0.1.5-clippy-fix
Apr 20, 2026
Merged

Desktop: fix macos clippy regression from #324#325
ericflo merged 1 commit intomainfrom
desktop-v0.1.5-clippy-fix

Conversation

@ericflo
Copy link
Copy Markdown
Owner

@ericflo ericflo commented Apr 20, 2026

Problem

The macos-latest clippy job failed on main after #324 merged:

```
error: this argument is passed by value, but not consumed in the function body
= note: `-D clippy::needless-pass-by-value` implied by `-D warnings`
```

On Linux and Windows the `_event` parameter name (underscore-prefixed) silenced the lint, so only macos-latest noticed.

Fix

Take `&RunEvent` in `handle_run_event` (both `#[cfg(target_os = "macos")]` and the noop variant). Adjust `app.run` closure to pass the borrow.

Test plan

  • CI clippy passes on all three platforms
  • `cargo fmt --check` still clean

🤖 Generated with Claude Code

Take RunEvent by reference in handle_run_event and convert the
app.run closure to pass &event. Fixes the macos-latest clippy job
introduced in #324:

  error: this argument is passed by value, but not consumed in the
  function body

On Linux/Windows the non-macos variant uses _event which silenced
the lint there; macOS used the owned form and tripped -D warnings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ericflo ericflo merged commit 0df10cc into main Apr 20, 2026
12 checks passed
@ericflo ericflo deleted the desktop-v0.1.5-clippy-fix branch April 20, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant