Skip to content

fix(desktop): clippy unnecessary_sort_by in trust ledger - #5

Merged
elijamesku merged 1 commit into
eli/github-connectorfrom
eli/fix-clippy-sort-by-key
Sep 17, 2026
Merged

elijamesku merged 1 commit into
eli/github-connectorfrom
eli/fix-clippy-sort-by-key

Conversation

@elijamesku

Copy link
Copy Markdown
Owner

Why

PR #4's CI got past lint, unit tests, and the desktop build, then failed Desktop Tauri clippy (-D warnings) on one lint in the new trust ledger:

error: consider using `sort_by_key`
  --> src/commands/trust_ledger.rs:285:5

Change

recent.sort_by(|a, b| b.last_at.cmp(&a.last_at)) → recent.sort_by_key(|s| std::cmp::Reverse(s.last_at)). Same ordering (newest first).

Verified locally (hermit toolchain)

  • just desktop-tauri-check — clean (desktop crate now compiles locally with cmake from hermit)
  • just desktop-tauri-clippy — clean
  • cargo test --lib -- commands::trust_ledger commands::time_machine — 6/6

Test plan

  • CI Desktop Core: Tauri clippy → check → tests all green

CI's Desktop Tauri clippy step runs with -D warnings; sort newest-first
with sort_by_key(Reverse(..)) instead of a reversed cmp closure.

Signed-off-by: Eli <elijamesau@gmail.com>
@elijamesku
elijamesku merged commit a907424 into eli/github-connector Sep 17, 2026
32 of 40 checks passed
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