Skip to content

Version 3.0.0

Version 3.0.0 #60

GitHub Actions / lint succeeded May 23, 2024 in 0s

lint

10 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 10
Note 0
Help 0

Versions

  • rustc 1.78.0 (9b00956e5 2024-04-29)
  • cargo 1.78.0 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9b00956 2024-04-29)

Annotations

Check warning on line 943 in src/scoring.rs

See this annotation in the file changed.

@github-actions github-actions / lint

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`)
   --> src/scoring.rs:941:31
    |
941 |   ...                   * (*scoring::KEYBOARD_STARTING_POSITIONS
    |  _________________________^
942 | | ...                       * scoring::KEYBOARD_AVERAGE_DEGREE.pow(j as u32))
943 | | ...                       as u64
    | |________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
help: try
    |
941 ~                             * (*scoring::KEYBOARD_STARTING_POSITIONS
942 +                                 * scoring::KEYBOARD_AVERAGE_DEGREE.pow(j as u32))
    |

Check warning on line 924 in src/scoring.rs

See this annotation in the file changed.

@github-actions github-actions / lint

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`)
   --> src/scoring.rs:924:39
    |
924 |         assert_eq!(p.estimate(token), base_guesses as u64);
    |                                       ^^^^^^^^^^^^^^^^^^^ help: try: `{ base_guesses }`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 892 in src/scoring.rs

See this annotation in the file changed.

@github-actions github-actions / lint

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`)
   --> src/scoring.rs:892:39
    |
892 |         assert_eq!(p.estimate(token), base_guesses as u64);
    |                                       ^^^^^^^^^^^^^^^^^^^ help: try: `{ base_guesses }`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `#[warn(clippy::unnecessary_cast)]` on by default

Check warning on line 864 in src/scoring.rs

See this annotation in the file changed.

@github-actions github-actions / lint

casting the result of `i32::abs()` to u64

warning: casting the result of `i32::abs()` to u64
   --> src/scoring.rs:864:19
    |
864 |             365 * (*scoring::REFERENCE_YEAR - p.year).abs() as u64
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(*scoring::REFERENCE_YEAR - p.year).unsigned_abs()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned

Check warning on line 829 in src/scoring.rs

See this annotation in the file changed.

@github-actions github-actions / lint

casting the result of `i32::abs()` to u64

warning: casting the result of `i32::abs()` to u64
   --> src/scoring.rs:829:13
    |
829 |             (*scoring::REFERENCE_YEAR - 1972).abs() as u64
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(*scoring::REFERENCE_YEAR - 1972).unsigned_abs()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned
    = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default

Check warning on line 536 in src/scoring.rs

See this annotation in the file changed.

@github-actions github-actions / lint

manual `RangeInclusive::contains` implementation

warning: manual `RangeInclusive::contains` implementation
   --> src/scoring.rs:536:16
    |
536 |             if n >= 63 && n <= 100 {
    |                ^^^^^^^^^^^^^^^^^^^ help: use: `(63..=100).contains(&n)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
    = note: `#[warn(clippy::manual_range_contains)]` on by default

Check warning on line 1211 in src/matching/mod.rs

See this annotation in the file changed.

@github-actions github-actions / lint

used `assert_eq!` with a literal bool

warning: used `assert_eq!` with a literal bool
    --> src/matching/mod.rs:1211:9
     |
1211 |         assert_eq!(p.ascending, false);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with `assert!(..)`
     |
1211 -         assert_eq!(p.ascending, false);
1211 +         assert!(!p.ascending);
     |

Check warning on line 1085 in src/matching/mod.rs

See this annotation in the file changed.

@github-actions github-actions / lint

used `assert_eq!` with a literal bool

warning: used `assert_eq!` with a literal bool
    --> src/matching/mod.rs:1085:13
     |
1085 |             assert_eq!(p.l33t, true);
     |             ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with `assert!(..)`
     |
1085 -             assert_eq!(p.l33t, true);
1085 +             assert!(p.l33t);
     |

Check warning on line 1066 in src/matching/mod.rs

See this annotation in the file changed.

@github-actions github-actions / lint

used `assert_eq!` with a literal bool

warning: used `assert_eq!` with a literal bool
    --> src/matching/mod.rs:1066:13
     |
1066 |             assert_eq!(p.l33t, true);
     |             ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with `assert!(..)`
     |
1066 -             assert_eq!(p.l33t, true);
1066 +             assert!(p.l33t);
     |

Check warning on line 993 in src/matching/mod.rs

See this annotation in the file changed.

@github-actions github-actions / lint

used `assert_eq!` with a literal bool

warning: used `assert_eq!` with a literal bool
   --> src/matching/mod.rs:993:13
    |
993 |             assert_eq!(p.reversed, true);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
    = note: `#[warn(clippy::bool_assert_comparison)]` on by default
help: replace it with `assert!(..)`
    |
993 -             assert_eq!(p.reversed, true);
993 +             assert!(p.reversed);
    |