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

Merged
merged 1 commit into from
Jan 16, 2025

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
@LegNeato LegNeato merged commit bd505dd into graphql-rust:master Jan 16, 2025
3 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.

2 participants