fix: resolve all clippy warnings by LeeroyHannigan · Pull Request #41 · ExtendDB/extenddb · GitHub
Skip to content

fix: resolve all clippy warnings#41

Merged
pdf-amzn merged 1 commit into
mainfrom
fix/clippy-warnings
May 19, 2026
Merged

fix: resolve all clippy warnings#41
pdf-amzn merged 1 commit into
mainfrom
fix/clippy-warnings

Conversation

@LeeroyHannigan

Copy link
Copy Markdown
Collaborator

Summary

Resolve all clippy warnings so cargo clippy --all-targets -- -D warnings passes clean.

Changes

  • Replace &[x.clone()] with std::slice::from_ref(&x) in auth policy evaluator tests
  • Fix doc comment indentation in error/mod.rs
  • Remove orphaned doc comment in engine/src/lib.rs
  • Replace mutable loop counter with computed index in index.rs
  • Use struct literal initialization instead of Default::default() + field reassign in validation tests
  • Add type aliases for complex return types in storage traits (ItemPairResult, QueryResult, TtlTableInfo, StreamRecordsResult, StreamListResult, UserListEntry, GroupListEntry, RoleListEntry, TableInfoRow)
  • Add #[allow(clippy::too_many_arguments)] for 3 internal functions where param structs would be a larger refactor
  • Auto-applied fixes: remove useless format!, simplify map_or, etc.

Follow-up

The 3 too_many_arguments allows should be replaced with param structs in a future PR. The type aliases could be upgraded to named structs for better self-documentation.

Verification

  • cargo clippy --all-targets -- -D warnings — zero warnings
  • cargo test --workspace — all pass
  • cargo fmt --all -- --check — clean

- Replace &[x.clone()] with std::slice::from_ref(&x) (auth tests)
- Fix doc comment indentation and remove orphaned doc comment
- Replace mutable loop counter with computed index (index.rs)
- Use struct literal initialization instead of Default + reassign (validation tests)
- Add type aliases for complex return types in storage traits
- Add #[allow(clippy::too_many_arguments)] for 3 internal functions
- Auto-fix: remove useless format!, simplify map_or, etc.

cargo clippy --all-targets -- -D warnings now passes clean.
@pdf-amzn pdf-amzn merged commit 881c533 into main May 19, 2026
@pdf-amzn pdf-amzn deleted the fix/clippy-warnings branch May 19, 2026 14:46
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.

2 participants