Skip to content

fix(recall): keep clippy clean on Windows, where FileId is () - #5180

Merged
pszymkowiak merged 1 commit into
rtk-ai:developfrom
LeviReisJs:fix/clippy-windows-file-id
Nov 19, 2026
Merged

pszymkowiak merged 1 commit into
rtk-ai:developfrom
LeviReisJs:fix/clippy-windows-file-id

Conversation

@LeviReisJs

@LeviReisJs LeviReisJs commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On Windows, cargo clippy --all-targets -- -D warnings fails on a clean develop (3ab08be):

error: passing a unit value to a function
   --> src\core\retriever.rs:271:26
    |
271 |             && before == Some(*id)
    = note: `-D clippy::unit-arg` implied by `-D warnings`

FileId is (u64, u64) on unix but () elsewhere (the recall connection cache, added with 94aa52e), so off unix Some(*id) passes a unit value. CI runs clippy on Linux only, so it never shows there.

  • before == Some(*id) becomes before.as_ref() == Some(id): the same comparison on both platforms (Option<&FileId> against Some(&FileId)), with no unit value passed by value. No behaviour change.

Test plan

  • cargo clippy --all-targets -- -D warnings on Windows 11: failed with the error above before the change, clean after.
  • cargo fmt --all -- --check, git diff --check
  • cargo test --no-fail-fast on Windows 11: same result as the clean base (5015 passed; the same 2 pre-existing failures, core::stream::...invalid_utf8 and find_cmd::run_from_args_propagates_find_exit_status).
  • Linux: not run locally; the unix FileId is a tuple, for which both forms compile, so CI covers it.

🤖 Generated with Claude Code

`before == Some(*id)` passes a unit value off unix, which -D warnings turns
into a clippy::unit_arg error on Windows. Compare by reference instead;
same comparison on every platform.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@pszymkowiak pszymkowiak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this one. I reproduced it on native Windows (MSVC, rustc 1.100.0): cargo clippy --all-targets -- -D warnings fails on develop with the unit-arg error at retriever.rs:271, and passes with your change. Linux clippy is clean too, the retriever tests pass on both platforms, and a full cargo test --all on Windows gives the same results with and without the PR. Good to merge.

@pszymkowiak
pszymkowiak merged commit 24ff226 into rtk-ai:develop Nov 19, 2026
3 checks passed
@rtk-release-bot rtk-release-bot Bot mentioned this pull request Nov 19, 2026
yungSNAT added a commit to yungSNAT/PascalsLetter that referenced this pull request Nov 24, 2026
* Merge pull request rtk-ai#4894 from KuSh/fix/schema-version-enum

fix(db): version the tracking and recall schema migrations

Ported from upstream rtk-ai/rtk 76be19c, with 24ff226 (rtk-ai#5180, clippy on
Windows FileId). tracking.rs keeps the fork's seen_by_agent cap helpers;
retriever.rs keeps a test-only open_existing for the tee and posthook tests.

Co-authored-by: Nicolas Le Cam <[email protected]>
Co-authored-by: LeviReisJs <[email protected]>

* test(db): databases from the fork's last release migrate, and a failed step leaves them usable

* fix(db): build against the fork's rusqlite 0.41 (MAIN_DB, busy_handler takes &mut)

* style(db): rustfmt

* test(db): a failed recall step and a step failing at its last statement leave the release's files usable

---------

Co-authored-by: Nicolas Le Cam <[email protected]>
Co-authored-by: LeviReisJs <[email protected]>
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.

2 participants