Skip to content

Hygiene: crate-prefixed codec examples, cargo fmt, clippy clean - #61

Merged
elyerinfox merged 3 commits into
developfrom
hygiene/fmt-clippy-examples
Oct 4, 2026
Merged

elyerinfox merged 3 commits into
developfrom
hygiene/fmt-clippy-examples

Conversation

@elyerinfox

Copy link
Copy Markdown
Collaborator

Code-only hygiene pass. The CI gate is a separate small PR that follows this one.

Submodule bump (every codec repo, now on its develop head)

  • Example binaries now have crate-prefixed names: bench -> <crate>_bench, kernels -> mpeg2_kernels / prores_kernels, ivfenc/ivfdec -> av1_* / vp9_*, and so on. cargo build --workspace --all-targets no longer links two same-named binaries into target/<profile>/examples, which failed on Windows with LNK1104 when parallel links raced on the same .exe.
  • One mechanical cargo fmt --all commit per repo. Hand-aligned data tables keep their layout under #[rustfmt::skip].
  • Every repo is clippy-clean under --all-targets --all-features -D warnings. h26x was the only one with findings (about 310).
    • Most were fixed outright. Three pervasive style lints are allowed crate-wide, each with a reason.
    • The h26x changes were checked bit-exact: all 427 conformance streams decode to the same MD5s, and so do all fixtures at every SIMD rung. The encoder identity grid matched in 1127/1127 cells.
  • Each codec repo's CI lint job now runs cargo fmt --all --check and clippy with --all-features.

This repo

  • cargo fmt --all, a mechanical commit on its own.
  • Clippy is clean for --workspace --all-targets -D warnings with every feature that builds without hardware or a CUDA toolkit. dpir-cuda and dpir-cudnn need nvcc and are left out.
    • 141 findings: most fixed, a few allowed at the item, and two narrow crate-level allows. The commit message has the list and a reason for each allow.

…clippy clean

Each codec repo's develop now has: examples renamed with a crate prefix
(bench -> <crate>_bench, kernels -> mpeg2_/prores_kernels, ivfenc/ivfdec ->
av1_/vp9_..., and so on), so `cargo build --workspace --all-targets` no longer
links two same-named example binaries into target/<profile>/examples (LNK1104 on
Windows); one mechanical `cargo fmt --all` commit; clippy clean under
--all-targets --all-features -D warnings (h26x's fixes verified bit-exact against
all 427 conformance streams and the encoder identity grid); and rustfmt/clippy
gates in each repo's CI.
Mechanical: the output of `cargo fmt --all` (rustfmt 1.10), nothing else.
Hand-aligned data tables keep their layout under #[rustfmt::skip].
…re-free feature

Checked with every feature that builds without hardware or a CUDA toolkit
(server, batch, image, thumbnail, ipc, qsv, nvidia, amd, the software
fallbacks, dpir); dpir-cuda / dpir-cudnn need nvcc and are left out.

Fixed: chunks_exact_to_as_chunks, collapsible_if, manual_is_multiple_of,
manual_repeat_n, clone_on_copy, question_mark, bool_assert_comparison,
needless_borrow, vec_init_then_push, unnecessary_min_or_max, err_expect,
collapsible_match, manual_range_patterns, while_let_loop, useless_conversion,
single_match, redundant_closure, derivable_impls, useless_format,
field_reassign_with_default, assertions_on_constants (now const asserts),
duplicated_attributes, doc_lazy_continuation, type_complexity in codec
(a type alias).

Allowed, with the reason beside each: crate-wide too_many_arguments in
rivet-container (box and track writers) and type_complexity in
rivet-transcoder (parsers' tuple returns); at the item, large_enum_variant on
the CLI's Command, codec's h26x Inner and dpir Net (one instance each),
needless_range_loop where an index also addresses other buffers, and
too_many_arguments on pad_plane and one test helper.
@elyerinfox
elyerinfox merged commit 6ac9d42 into develop Oct 4, 2026
7 checks passed
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.

1 participant