Skip to content

chore(clippy): fix clippy warnings#301

Open
jagan-jaya wants to merge 1 commit into
mainfrom
chore/fix-clippy-warnings
Open

chore(clippy): fix clippy warnings#301
jagan-jaya wants to merge 1 commit into
mainfrom
chore/fix-clippy-warnings

Conversation

@jagan-jaya

@jagan-jaya jagan-jaya commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Fix existing clippy warnings across crates

@jagan-jaya jagan-jaya self-assigned this Jul 1, 2026
@jagan-jaya jagan-jaya marked this pull request as ready for review July 1, 2026 23:03
Copilot AI review requested due to automatic review settings July 1, 2026 23:03

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

This PR addresses existing Clippy warnings across the decision engine and its crates by applying small, semantics-preserving refactors and more idiomatic Rust constructs (aligned with the repo MSRV of Rust 1.85.0).

Changes:

  • Replace Option::map_or(true, ...) with Option::is_none_or(...) for clearer intent.
  • Simplify numeric bounds checking using inclusive range contains(...).
  • Reduce repetition and manual impls via Self::... enum matching and #[derive(Default)] with #[default].

Reviewed changes

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

File Description
src/sr_auto_calibration.rs Uses is_none_or to simplify “missing value implies changed” logic for calibration updates.
src/decider/gatewaydecider/multi_objective/hypersense_client.rs Refactors plausibility checks into range-based validation for readability (and stricter handling of non-finite values).
src/analytics/models.rs Replaces explicit enum type names with Self to satisfy Clippy and reduce verbosity.
crates/gsm/src/types.rs Removes manual Default impl in favor of derived Default with an explicit #[default] variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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