fix(ci): clippy clean on rust 1.94 (LC-187) #254

Merged
nrupard merged 1 commit from fix/lc-187-clippy-resolve-msg-author into main 2026-05-28 21:16:46 +02:00
Owner

Summary

Clippy (workspace, standalone) CI job failed with three errors on rust 1.94 (the version pinned in ci-build/Dockerfile.web via ghcr.io/niceguyit/rust-builder-glibc:v1.0.0-rust1.94-trixie).

  1. clippy::too_many_arguments on resolve_msg_author (server/src/routes/mod.rs:154). 9 args, clippy's default ceiling is 7. Each Option<i64> / Option<&str> is read straight off a RawMessage row; bundling them into a synthetic-actor struct would force the 9 resolve_msg_author callsites plus the 6 sibling outgoing_actor callsites to build the same struct from the same six fields. Suppress with #[allow(clippy::too_many_arguments)] and document the choice in the function's doc comment so the next reader doesn't re-litigate.
  2. clippy::manual_repeat_n on server/tests/spike_image_decoder_hostile_corpus.rs:78,96. Rust 1.94 stabilized std::iter::repeat_n(x, n) as the canonical form of std::iter::repeat(x).take(n). Migrate both call sites.
  3. clippy::byte_char_slices on server/tests/routes_media_bridge_avatar_proxy.rs:167. The &[b'P', b'N', b'G', ...] array of byte literals is more cleanly written as a byte string literal b"PNGBYTES". Comment moved above the binding.

Per the LC-187 ticket description, this is the standing "CI check workflow failure" issue; cite this ticket rather than opening a new one for fmt/lint drift.

Test plan

  • ./dev/cargo clippy --workspace --all-targets --features standalone -- -D warnings clean.
  • ./dev/cargo clippy --workspace --all-targets --no-default-features --features saas -- -D warnings clean.
  • ./dev/cargo fmt --all -- --check clean.
  • CI Check workflow runs green on this branch.
## Summary `Clippy (workspace, standalone)` CI job failed with three errors on rust 1.94 (the version pinned in `ci-build/Dockerfile.web` via `ghcr.io/niceguyit/rust-builder-glibc:v1.0.0-rust1.94-trixie`). 1. **`clippy::too_many_arguments`** on `resolve_msg_author` (`server/src/routes/mod.rs:154`). 9 args, clippy's default ceiling is 7. Each `Option<i64>` / `Option<&str>` is read straight off a `RawMessage` row; bundling them into a synthetic-actor struct would force the 9 `resolve_msg_author` callsites plus the 6 sibling `outgoing_actor` callsites to build the same struct from the same six fields. Suppress with `#[allow(clippy::too_many_arguments)]` and document the choice in the function's doc comment so the next reader doesn't re-litigate. 2. **`clippy::manual_repeat_n`** on `server/tests/spike_image_decoder_hostile_corpus.rs:78,96`. Rust 1.94 stabilized `std::iter::repeat_n(x, n)` as the canonical form of `std::iter::repeat(x).take(n)`. Migrate both call sites. 3. **`clippy::byte_char_slices`** on `server/tests/routes_media_bridge_avatar_proxy.rs:167`. The `&[b'P', b'N', b'G', ...]` array of byte literals is more cleanly written as a byte string literal `b"PNGBYTES"`. Comment moved above the binding. Per the LC-187 ticket description, this is the standing "CI check workflow failure" issue; cite this ticket rather than opening a new one for fmt/lint drift. ## Test plan - [x] `./dev/cargo clippy --workspace --all-targets --features standalone -- -D warnings` clean. - [x] `./dev/cargo clippy --workspace --all-targets --no-default-features --features saas -- -D warnings` clean. - [x] `./dev/cargo fmt --all -- --check` clean. - [ ] CI Check workflow runs green on this branch.
fix(ci): clippy clean on rust 1.94 (LC-187)
All checks were successful
check-secrets / Nosey parker (push) Successful in 3s
check-secrets / Kingfisher (push) Successful in 4s
check-secrets / TruffleHog (push) Successful in 5s
check-secrets / Nosey parker (pull_request) Successful in 4s
check-secrets / TruffleHog (pull_request) Successful in 6s
check-secrets / Kingfisher (pull_request) Successful in 7s
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 2m21s
5b28d951fa
Three clippy errors broke `Clippy (workspace, standalone)`:

1. `clippy::too_many_arguments` on `resolve_msg_author` (`server/src/routes/mod.rs:154`): 9 args, clippy's default ceiling is 7. Each `Option<i64>` / `Option<&str>` is read straight off a `RawMessage` row; grouping them into a synthetic-actor struct would force the 9 callsites (plus 6 more on the sibling `outgoing_actor`) to build that struct from the same six fields. Suppress with `#[allow(clippy::too_many_arguments)]` and document the choice in the doc comment.

2. `clippy::manual_repeat_n` on `spike_image_decoder_hostile_corpus.rs:78,96`: rust 1.94 stabilized `std::iter::repeat_n(x, n)` as the canonical form of `std::iter::repeat(x).take(n)`. Migrate both call sites.

3. `clippy::byte_char_slices` on `routes_media_bridge_avatar_proxy.rs:167`: the `&[b'P', b'N', b'G', ...]` array of byte literals is more cleanly written as a byte string literal `b"PNGBYTES"`. Switched.

Verified: `cargo clippy --workspace --all-targets --features standalone -- -D warnings` and `cargo clippy --workspace --all-targets --no-default-features --features saas -- -D warnings` both clean. `cargo fmt --all -- --check` clean.

#LC-187
nrupard deleted branch fix/lc-187-clippy-resolve-msg-author 2026-05-28 21:16:46 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!254
No description provided.