Skip to content

Clear all clippy warnings (style/lint cleanup)#40

Merged
russellromney merged 1 commit into
mainfrom
chore/clippy-warnings
May 25, 2026
Merged

Clear all clippy warnings (style/lint cleanup)#40
russellromney merged 1 commit into
mainfrom
chore/clippy-warnings

Conversation

@russellromney

Copy link
Copy Markdown
Owner

cargo clippy reported ~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

  • Machine-applicable fixes (clippy --fix): io::Error::other, div_ceil, slice .first(), derivable Default impls, 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 # Safety sections to the unsafe extern "C" FFI entry points.
  • Deprecated 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 (# Safety docs), 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 clippy0 warnings in all three modes (lib, ffi default, ffi loadable-extension)
  • lib suite: 568 passed, 0 failed
  • loadable extension (Python): 27/27

🤖 Generated with Claude Code

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>
@russellromney russellromney merged commit 593dfbf into main May 25, 2026
4 checks passed
@russellromney russellromney deleted the chore/clippy-warnings branch May 25, 2026 20:41
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