Skip to content

fix clippy detecting PI in exchange rate in nbp.rs - #157

Merged
jczaja merged 1 commit into
mainfrom
clippy-nbp-rs
Jun 27, 2025
Merged

fix clippy detecting PI in exchange rate in nbp.rs#157
jczaja merged 1 commit into
mainfrom
clippy-nbp-rs

Conversation

@sfraczek

Copy link
Copy Markdown
Collaborator

Adds attribute #[allow(clippy::approx_constant)] to generated function by gen_exchange_rates.rs.

Adds attribute #[allow(clippy::approx_constant)] to generated function
by gen_exchange_rates.rs.
@sfraczek
sfraczek requested review from Copilot and jczaja June 26, 2025 13:32
@sfraczek sfraczek added the enhancement New feature or request label Jun 26, 2025

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 disables a clippy warning for the generated exchange rate function in nbp.rs.

  • Added #[allow(clippy::approx_constant)] attribute to the get_exchange_rates function to silence a PI approximation warning.
Comments suppressed due to low confidence (1)

src/nbp.rs:5

  • [nitpick] Consider adding a comment explaining why clippy::approx_constant is allowed here to help future maintainers understand the context.
#[allow(clippy::approx_constant)]

@jczaja jczaja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@jczaja
jczaja merged commit c01d402 into main Jun 27, 2025
5 checks passed
@sfraczek
sfraczek deleted the clippy-nbp-rs branch June 29, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants