Skip to content

fix: resolve rust CI clippy failures in memory API sorting#163

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ci-failures-pr-158
Draft

fix: resolve rust CI clippy failures in memory API sorting#163
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ci-failures-pr-158

Conversation

Copilot AI commented May 11, 2026

Copy link
Copy Markdown
Contributor

PR #158 failed the rust check due to clippy::unnecessary_sort_by in src-tauri/src/memory/api.rs. This updates the flagged sort sites to clippy-compliant key-based sorting without changing ordering semantics.

  • CI failure scope

    • Addressed six clippy errors in memory query/context assembly paths (list_sessions, query_recent_errors, and get_context collections).
  • Code changes

    • Replaced comparator closures (sort_by) with sort_by_key.
    • Used std::cmp::Reverse(...) for descending sorts to preserve existing behavior.
  • Behavioral intent

    • No functional change to returned ordering; this is a mechanical refactor to satisfy strict -D warnings clippy policy.
// before
sessions.sort_by(|a, b| b.started_at.cmp(&a.started_at));

// after
sessions.sort_by_key(|session| std::cmp::Reverse(session.started_at));

Copilot AI requested review from Copilot and removed request for Copilot May 11, 2026 23:18
Copilot AI linked an issue May 11, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/plures/runebook/sessions/e4af80fb-ee45-4e43-9db4-7e881af00165

Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 11, 2026 23:20
Copilot AI changed the title [WIP] Fix CI failures on PR #158 fix: resolve rust CI clippy failures in memory API sorting May 11, 2026
Copilot AI requested a review from kayodebristol May 11, 2026 23:22
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.

[ci-feedback] Fix CI failures on PR #158

2 participants