refactor(ar,ar2): group params in private helpers + document too_many_arguments allows (#83)#228
Merged
Merged
Conversation
) First increment of the too_many_arguments cleanup. Refactor the three private, non-SIMD helpers to take a param struct (destructured at the top so bodies are unchanged), removing their #[allow]: - ar/matrix.rs: sample_grid -> GridSample - ar2/feature_map.rs: make_template -> TemplatePatch, select_features -> FeatureSelection For the remaining ar/ar2 allows, add a `// rationale:` comment instead of refactoring: - public C-faithful API (ar_labeling, ar_detect_marker2, ar_get_marker_info, ar_patt_save/get_image/get_image2, ar2_tracking_2d_sub, ar2_get_best_matching[_sub_fine]) — struct-grouping would be a breaking change, deferred to a pre-1.0 API pass. - SIMD runtime-dispatch (get_similarity + _scalar) — signatures locked to the SIMD variants for is_x86_feature_detected! dispatch. kpm/freak allows are left for a follow-up increment. Full audit + incremental plan in docs/design/issue-83-too-many-args-audit.md. Verified: cargo test (matrix + feature_map green), strict clippy clean, and the simple (pattern) + simple_nft (kpm) examples run correctly (marker CF 0.89 / KPM match error 5.09). Refs #83 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
First increment of the
clippy::too_many_argumentscleanup (#83). Includes a full audit doc:docs/design/issue-83-too-many-args-audit.md.What this does
Refactor the three private, non-SIMD helpers into param structs (destructured at the top so bodies are untouched), removing their
#[allow]:ar/matrix.rs—sample_grid→GridSamplear2/feature_map.rs—make_template→TemplatePatch,select_features→FeatureSelectionDocument the remaining
ar/ar2allows with a// rationale:comment instead of refactoring:ar_labeling,ar_detect_marker2,ar_get_marker_info,ar_patt_save/get_image/get_image2,ar2_tracking_2d_sub,ar2_get_best_matching[_sub_fine]) — grouping into structs is a breaking change, deferred to a deliberate pre-1.0 API pass.get_similarity+_scalar) — signatures locked to the SIMD variants foris_x86_feature_detected!dispatch (per CLAUDE.md §7.4).kpm/freakallows are left for a follow-up increment (see the audit doc's plan).Verification
cargo test— matrix + feature_map suites green (incl.make_template/select_featurespaths)cargo fmt --checkclean; strictclippy --all-targets --all-features -D warningscleansimple(pattern) → marker CF 0.89, pose OK;simple_nft(kpm) → ✓ KPM match, error 5.09Part of the Stabilization & DX milestone.
🤖 Generated with Claude Code