Skip to content

chore: fix clippy lints on rust 1.95 - #113

Open
MavenRain wants to merge 1 commit into
flashbots:mainfrom
MavenRain:chore/clippy-stable-lints
Open

chore: fix clippy lints on rust 1.95#113
MavenRain wants to merge 1 commit into
flashbots:mainfrom
MavenRain:chore/clippy-stable-lints

Conversation

@MavenRain

Copy link
Copy Markdown

Summary

Two one-line fixes so the Clippy CI jobs (--all-targets --all-features -- -D warnings and the --no-default-features variant) pass again on the current stable toolchain (rust 1.95): clippy::manual_checked_ops in orderpool2/prioritized_pool/step.rs and clippy::useless_conversion in orderpool2/prioritized_pool/mod.rs. Same spirit as #100 and #104.

No behaviour change.

Note on CI

Unrelated to this change, a fresh Cargo.lock now resolves alloy-* to 1.8.x, which conflicts with op-alloy-network 0.23.1 (E0119: conflicting implementations of NetworkWallet<Optimism> for EthereumWallet). Locally I pinned the alloy family to 1.7.3 to build; the proper fix is a dependency bump and is out of scope here, but it means the Clippy/Test jobs may still fail at lock resolution until that is addressed.

Stable clippy 1.95 rejects two spots in the prioritized order pool with
`-D warnings`, which turns the Clippy CI jobs red for every PR:

- `clippy::manual_checked_ops` on the effective gas price computation
  (`if total_gas_limit != 0 { a / b } else { 0 }`); use `checked_div`.
- `clippy::useless_conversion` on `extend(orders.into_iter())`; pass the
  set directly.

No behaviour change.

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
Copilot AI lite review requested due to automatic review settings August 18, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Refactors a couple of small code paths in the prioritized order pool to make them more idiomatic and slightly simpler, without changing behavior.

Changes:

  • Simplified effective gas price computation using checked_div(...).unwrap_or(0).
  • Simplified extend(...) usage by removing a redundant into_iter().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/pipeline/src/orderpool2/prioritized_pool/step.rs Computes effective gas price via checked_div to avoid explicit zero-division branching.
crates/pipeline/src/orderpool2/prioritized_pool/mod.rs Removes redundant iterator conversion when extending invalidated_orders.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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