Skip to content

just gate fails on current stable clippy in encode_params #727

Description

@teh-hippo

Problem

just gate cannot complete on current stable. cargo clippy --all-targets --all-features -- -D warnings stops at src/icloud/photos/queries.rs:242:

error: consider using `sort_unstable_by_key`
   --> src/icloud/photos/queries.rs:242:5
    |
242 |     pairs.sort_unstable_by(|(left_key, _), (right_key, _)| left_key.cmp(right_key));

clippy::unnecessary_sort_by fires on 1.97.1 and does not fire on the 1.94.1 pinned by RUST_STABLE_TOOLCHAIN in .github/workflows/ci.yml, so CI is unaffected and this is purely a local blocker.

Impact

just gate halts at its first static phase, hiding every later phase. Anyone running the documented pre-push gate on a current stable toolchain sees a failure unrelated to their branch and has to run the remaining phases by hand, or discover that RUSTUP_TOOLCHAIN=1.94.1 is needed.

Expected behaviour

just gate passes on both the pinned toolchain and current stable, or the toolchain expectation is stated where the gate is documented.

The lint's own suggestion applies cleanly:

pairs.sort_unstable_by_key(|(key, _)| *key);

Keying the sort also states the intent directly: ordering depends on the parameter name and never on the value.

Raised separately rather than folded into a feature branch, since it touches a file no current feature needs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4 laterValid work that is deliberately not near-termdependenciesPull requests that update a dependency filerustPull requests that update rust code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions