Enable clippy nursery lints and clear the warnings #143

Merged
sermuns merged 1 commit from clippy-nursery into main 2026-10-23 15:16:36 +00:00
Owner

Enables clippy::nursery in [workspace.lints.clippy] and clears what it surfaces.

Allowed globally (each fires well over ten times): missing_const_for_fn, suboptimal_flops, too_long_first_doc_paragraph.

Fixed: option_if_let_else, useless_let_if_seq, redundant_clone, needless_collect, significant_drop_in_scrutinee, significant_drop_tightening, tuple_array_conversions, redundant_pub_crate, while_float, suspicious_operation_groupings, needless_pass_by_ref_mut, plus the machine-applicable ones.

recursion_depth_exceeding_limit: nursery pulls in clippy::future_not_send, which overflows the trait solver on Renderer::new; fixed with a crate recursion_limit in liuverse-render.

Audits the existing Cargo.toml allows against the new "ten expects warrant an allow" rule (added to AGENTS.md). Three did not qualify and were removed: uninlined_format_args (2), needless_pass_by_value (3), missing_errors_doc (4).

just check passes.

Merged

Merged into main as part of the batch (order: #136, #142, #137, #138, #141, #139, #140, #143). The batch carries a single major bump, 1.1.2 → 2.0.0, so this branch's own bump commit was dropped when it was rebased; PROTOCOL_VERSION stays 2. assets/baked/valla.bin was rebaked once at the end of the batch.

On rebase the nursery lints also surfaced warnings in code the other seven branches had added — a redundant clone, a pub(crate) item in a private module, a contains-then-insert, a needless by-value Vec, and mutex guards held across broadcasts — and those were fixed in the same commit.

Enables `clippy::nursery` in `[workspace.lints.clippy]` and clears what it surfaces. Allowed globally (each fires well over ten times): `missing_const_for_fn`, `suboptimal_flops`, `too_long_first_doc_paragraph`. Fixed: `option_if_let_else`, `useless_let_if_seq`, `redundant_clone`, `needless_collect`, `significant_drop_in_scrutinee`, `significant_drop_tightening`, `tuple_array_conversions`, `redundant_pub_crate`, `while_float`, `suspicious_operation_groupings`, `needless_pass_by_ref_mut`, plus the machine-applicable ones. `recursion_depth_exceeding_limit`: nursery pulls in `clippy::future_not_send`, which overflows the trait solver on `Renderer::new`; fixed with a crate `recursion_limit` in `liuverse-render`. Audits the existing `Cargo.toml` allows against the new "ten expects warrant an allow" rule (added to `AGENTS.md`). Three did not qualify and were removed: `uninlined_format_args` (2), `needless_pass_by_value` (3), `missing_errors_doc` (4). `just check` passes. ## Merged Merged into `main` as part of the batch (order: #136, #142, #137, #138, #141, #139, #140, #143). The batch carries a single major bump, `1.1.2` → `2.0.0`, so this branch's own bump commit was dropped when it was rebased; `PROTOCOL_VERSION` stays 2. `assets/baked/valla.bin` was rebaked once at the end of the batch. On rebase the nursery lints also surfaced warnings in code the other seven branches had added — a redundant clone, a `pub(crate)` item in a private module, a `contains`-then-`insert`, a needless by-value `Vec`, and mutex guards held across broadcasts — and those were fixed in the same commit.
sermuns force-pushed clippy-nursery from 1801dd51f5 to be4ab3188c 2026-10-23 15:16:30 +00:00 Compare
Sign in to join this conversation.
No description provided.