Tighten temporarily allowed Clippy lints in runtime/Cargo.toml #13

Open
opened 2026-12-06 00:20:09 +00:00 by github-bot · 0 comments
Owner

@⁠VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original

Problem

runtime/Cargo.toml temporarily allows eight Clippy style lints across the workspace (type_complexity, needless_range_loop, chunks_exact_to_as_chunks, sliced_string_as_bytes, collapsible_match, manual_clamp, implicit_saturating_sub, min_max). Tackling these one lint at a time improves code clarity and lets us tighten workspace lint hygiene cleanly.

Known Evidence

  • Observed directly in runtime/Cargo.toml (lines 51–62):
    • All eight lints are explicitly listed as "allow" under [workspace.lints.clippy].
    • Several of them (manual_clamp, min_max, implicit_saturating_sub, sliced_string_as_bytes, collapsible_match) typically have very small, mechanical fix counts.
  • Synthetic / Local verification: Fully checkable via cargo clippy and cargo test with no title files required.

Approaches That Did Not Work

  • Fixing all eight lints in one massive PR: Hard to review and prone to merge conflicts across active GPU/shader work. Fix one lint per pull request (starting with the smallest ones like manual_clamp, min_max or sliced_string_as_bytes).

Relevant Source Modules

  • runtime/Cargo.toml (lines 51–62)
  • Affected crates surfaced by cargo clippy when a single "allow" line is removed

Expected Contribution

  1. Pick one of the smaller allowed lints in runtime/Cargo.toml (e.g., manual_clamp, min_max, implicit_saturating_sub, sliced_string_as_bytes or collapsible_match).
  2. Remove its "allow" line in runtime/Cargo.toml.
  3. Fix each warning idiomatically without altering runtime behavior or hot-path performance (avoid unnecessary allocations or changes to SIMD loops).
  4. Verify with cargo clippy (default and --all-features) and cargo test.

Acceptance Criteria

  • At least one lint "allow" entry is removed from runtime/Cargo.toml.
  • cargo clippy --workspace --all-targets --locked -- -D warnings and --all-features pass cleanly.
  • cargo test --workspace --locked passes with zero regressions and no behavioral changes.
**@⁠VictoryX-dev** on GitHub · 2026-12-03 02:57 UTC · [original](https://github.com/VictoryX-dev/VictoryX/issues/13) ## Problem `runtime/Cargo.toml` temporarily allows eight Clippy style lints across the workspace (`type_complexity`, `needless_range_loop`, `chunks_exact_to_as_chunks`, `sliced_string_as_bytes`, `collapsible_match`, `manual_clamp`, `implicit_saturating_sub`, `min_max`). Tackling these one lint at a time improves code clarity and lets us tighten workspace lint hygiene cleanly. ## Known Evidence - **Observed directly in `runtime/Cargo.toml` (lines 51–62):** - All eight lints are explicitly listed as `"allow"` under `[workspace.lints.clippy]`. - Several of them (`manual_clamp`, `min_max`, `implicit_saturating_sub`, `sliced_string_as_bytes`, `collapsible_match`) typically have very small, mechanical fix counts. - **Synthetic / Local verification:** Fully checkable via `cargo clippy` and `cargo test` with no title files required. ## Approaches That Did Not Work - **Fixing all eight lints in one massive PR:** Hard to review and prone to merge conflicts across active GPU/shader work. Fix **one lint per pull request** (starting with the smallest ones like `manual_clamp`, `min_max` or `sliced_string_as_bytes`). ## Relevant Source Modules - `runtime/Cargo.toml` (lines 51–62) - Affected crates surfaced by `cargo clippy` when a single `"allow"` line is removed ## Expected Contribution 1. Pick **one** of the smaller allowed lints in `runtime/Cargo.toml` (e.g., `manual_clamp`, `min_max`, `implicit_saturating_sub`, `sliced_string_as_bytes` or `collapsible_match`). 2. Remove its `"allow"` line in `runtime/Cargo.toml`. 3. Fix each warning idiomatically without altering runtime behavior or hot-path performance (avoid unnecessary allocations or changes to SIMD loops). 4. Verify with `cargo clippy` (default and `--all-features`) and `cargo test`. ## Acceptance Criteria - [ ] At least one lint `"allow"` entry is removed from `runtime/Cargo.toml`. - [ ] `cargo clippy --workspace --all-targets --locked -- -D warnings` and `--all-features` pass cleanly. - [ ] `cargo test --workspace --locked` passes with zero regressions and no behavioral changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:20:09 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
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
github/VictoryX-dev--VictoryX#13
No description provided.