Conversation
- needless_range_loop: convert index loops to iterator/enumerate patterns - manual_clamp: replace min/max chains with .clamp() - ptr_arg: accept &mut [T] instead of &mut Vec<T> where possible - large_enum_variant: box large PreflateStreamProcessor in FoundStreamType, FindStreamResult, and ChunkParseState to reduce enum size - upper_case_acronyms: rename RGB→Rgb, RGBA→Rgba, IHDR→Ihdr, IDAT→Idat, JPEG→Jpeg in private/public enums - manual_memcpy: use copy_from_slice - same_item_push: use repeat_n - len_without_is_empty: add is_empty to PlainText - too_many_arguments: suppress with allow attribute (refactoring would break API) - missing_safety_doc: add Safety sections to all unsafe extern C functions - Various: needless_borrow, redundant_field_names, collapsible_if, unnecessary_cast, needless_return, useless_conversion, etc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
for i in 0..lenloops to idiomatic iterator/enumerate()patterns across ~12 sitesPreflateStreamProcessorinFoundStreamType::DeflateStream,FindStreamResult::Found, andChunkParseState::DeflateContinueto reduce enum stack sizes (was ~304–392 bytes)RGB→Rgb,RGBA→RgbainPngColorType;IHDR→Ihdr,IDAT→Idat,JPEG→Jpegin the privateSignatureenum# Safetysections to all 7unsafe extern "C"functions in the DLL crate.clamp(),copy_from_slice, andrepeat_npqdownheapnow takes&mut [HuffTreeNode]instead of&mut Vec<HuffTreeNode>PlainText::is_empty()methodneedless_borrow,redundant_field_names,collapsible_if,useless_conversion,unnecessary_cast,needless_return,assign_op_pattern, etc.All tests pass (
cargo test --all), zero clippy warnings remain (cargo clippy --all).Test plan
cargo clippy --all— zero warningscargo test --all— all tests pass🤖 Generated with Claude Code