Clear all clippy warnings (style/lint cleanup)#40
Merged
Conversation
clippy reported ~109 warnings (it had never been enforced on the ffi crate). Drive the lib, ffi-default, and ffi-loadable-extension builds all to zero, with no behavior change: - Machine-applicable fixes via clippy --fix: io::Error::other, div_ceil, slice .first(), derivable impls, sort_by_key, c"..." literals, etc. - suspicious_open_options: added explicit .truncate(false) — preserves the current default behavior, just makes it intentional (never truncate(true)). - too_many_arguments: allowed crate-wide; the tiered pipeline threads many params through flush/compact/prefetch by design. - missing_safety_doc: added # Safety sections to the unsafe extern "C" FFI entry points. - Deprecated SyncMode::S3Primary / set_local_checkpoint_only: scoped #[allow(deprecated)] with comments (kept for back-compat; no behavior change). Verified: lib 568 passed, loadable-ext 27/27, clippy clean in all three modes. Co-Authored-By: Claude Opus 4.7 <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.
cargo clippyreported ~109 warnings — it had never been enforced on the ffi crate. This drives the lib, ffi-default, and ffi-loadable-extension builds all to 0 warnings, with no behavior change.What changed
clippy --fix):io::Error::other,div_ceil, slice.first(), derivableDefaultimpls,sort_by_key,c"..."C-string literals, redundant casts/locals, needless range loops, etc.suspicious_open_options(9 sites): added explicit.truncate(false). This makes the current default behavior intentional without changing it — never.truncate(true)(that would wipe file contents).too_many_arguments: allowed crate-wide with a rationale comment — the tiered storage pipeline threads many params through flush/compact/prefetch by design; bundling them into structs is a separate refactor.missing_safety_doc: added# Safetysections to theunsafe extern "C"FFI entry points.SyncMode::S3Primary/set_local_checkpoint_only: scoped#[allow(deprecated)]with comments — these are kept for back-compat; migrating them would change config semantics, so behavior is preserved.Behavior preservation
Every change is either a comment (
# Safetydocs), a semantically-identical rewrite (io::Error::other,div_ceil, derive), an explicit no-op (.truncate(false)= the existing default), or a scoped#[allow]. No logic changes.Verification
cargo clippy— 0 warnings in all three modes (lib, ffi default, ffi loadable-extension)🤖 Generated with Claude Code