Skip to content

chore: fix clippy lints surfaced by Rust 1.97 toolchain bump#183

Merged
StefanSteiner merged 1 commit into
tableau:mainfrom
StefanSteiner:chore/fix-rust-197-clippy-lints
Jul 9, 2026
Merged

chore: fix clippy lints surfaced by Rust 1.97 toolchain bump#183
StefanSteiner merged 1 commit into
tableau:mainfrom
StefanSteiner:chore/fix-rust-197-clippy-lints

Conversation

@StefanSteiner

Copy link
Copy Markdown
Contributor

What

Fix three clippy lints that were tightened/added in the Rust 1.97 stable release (2026-07-07) and now fail CI under -D warnings. All three are on pre-existing code — no behavior change.

Lint Location Fix
dead_code hyperdb-api/tests/common/mod.rs Replace the scattered per-item #[expect(dead_code)] / #[allow(dead_code)] attributes with a single module-level #![allow(dead_code, reason = ...)]. The shared helpers are compiled into every integration-test binary but each binary uses only a subset, so any given helper is dead in the binaries that don't reference it. allow (not expect) because the same item is live in other binaries — an expect would be unfulfilled there and trip unfulfilled_lint_expectations. The struct's previous #[expect] was in fact already unfulfilled under 1.97.
useless_borrows_in_formatting hyperdb-api/tests/logging_tests.rs (×19) &*logs*logs in assert! format args.
manual_assert_eq hyperdb-api/src/server_version.rs:265 assert!(v1 == ...)assert_eq!(v1, ...).

Why now

The repo's rust-toolchain.toml pins channel = "stable" — a moving target — and CI's actions-rust-lang/setup-rust-toolchain@v1 { toolchain: stable } fetches the newest stable. main's last CI run predates the 1.95 → 1.97 bump, so main currently looks green but fails the moment CI re-runs on 1.97. Any open PR that triggers a fresh CI run (e.g. the open dependabot PRs) will hit this same wall until this lands.

Verification

On the CI toolchain (1.97.0) with HYPERD_PATH set, both CI commands are green:

cargo +1.97.0 fmt --all --check                                          # exit 0
cargo +1.97.0 clippy --workspace --all-targets --all-features -- -D warnings   # exit 0

Also verified green on 1.95 (backward-compatible), and the affected tests pass: server_version 14/0, logging_tests 8/0.

CI's pinned `stable` toolchain moved 1.95 -> 1.97 (2026-07-07), which
tightened three lints on pre-existing test/code shared with main:

- dead_code: tests/common/mod.rs helpers are compiled into every
  integration-test binary but each uses only a subset. Replace the
  scattered per-item #[expect]/#[allow] attributes (the struct's #[expect]
  was unfulfilled in binaries that DO use it) with one module-level
  #![allow(dead_code, reason=...)].
- useless_borrows_in_formatting: logging_tests.rs, 19x '&*logs' -> '*logs'.
- manual_assert_eq: server_version.rs, assert!(a == b) -> assert_eq!(a, b).

Verified green on both 1.95 and 1.97 with:
  cargo clippy --workspace --all-targets --all-features -- -D warnings
@StefanSteiner StefanSteiner merged commit b779c34 into tableau:main Jul 9, 2026
11 checks passed
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