Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Use numeric constant #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

caspermeijn
Copy link
Contributor

This solves clippy warnings like this:

error: usage of a legacy numeric method
   --> src/common.rs:418:31
    |
418 |             Number::from(i32::min_value()).as_i64(),
    |                               ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    = note: `-D clippy::legacy-numeric-constants` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
    |
418 |             Number::from(i32::MIN).as_i64(),
    |                               ~~~

This solves clippy warnings like this:
```
error: usage of a legacy numeric method
   --> src/common.rs:418:31
    |
418 |             Number::from(i32::min_value()).as_i64(),
    |                               ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    = note: `-D clippy::legacy-numeric-constants` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
    |
418 |             Number::from(i32::MIN).as_i64(),
    |                               ~~~

```
@caspermeijn caspermeijn force-pushed the legacy_numeric_constants branch from eacee3c to 59ac1cd Compare December 19, 2024 12:57
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