Skip to content

Fix Clippy warnings: type complexity, needless borrow, etc. #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

strmfos
Copy link

@strmfos strmfos commented Mar 26, 2025

Summary

  • Refactored the r1cs_to_qap.rs return type from a large tuple into a QAPTuple<F> type alias (resolving Clippy’s type_complexity).
  • Removed unnecessary references in calls to evaluate_constraint (fixing Clippy’s needless_borrow).
  • Simplified Ok(...)? usage in lib.rs (resolving needless_question_mark).
  • Either reduced function arguments or allowed clippy::too_many_arguments where needed, to silence that lint without breaking API.

Why

  • These changes address Clippy warnings and maintain the codebase in a warning-free state under -D warnings.
  • Improves readability (alias for large tuple) and ensures more idiomatic Rust usage (avoiding pointless references).

Testing

  • Verified locally with cargo clippy --all -- -D warnings that no warnings remain.
  • Confirmed code compiles and tests pass, ensuring no functional regressions.

@strmfos strmfos requested a review from a team as a code owner March 26, 2025 11:00
@strmfos strmfos requested review from Pratyush, mmagician and weikengchen and removed request for a team March 26, 2025 11:00
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