Skip to content

Version 3.0.1

Version 3.0.1 #70

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

lint

11 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 11
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 1152 in src/scoring.rs

See this annotation in the file changed.

@github-actions github-actions / lint

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
    --> src/scoring.rs:1152:42
     |
1152 |         let value = serde_json::to_value(&score).unwrap();
     |                                          ^^^^^^ help: change this to: `score`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
     = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check warning on line 954 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:952:31
    |
952 |   ...                   * (*scoring::KEYBOARD_STARTING_POSITIONS
    |  _________________________^
953 | | ...                       * scoring::KEYBOARD_AVERAGE_DEGREE.pow(j as u32))
954 | | ...                       as u64
    | |________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
help: try
    |
952 ~                             * (*scoring::KEYBOARD_STARTING_POSITIONS
953 +                                 * scoring::KEYBOARD_AVERAGE_DEGREE.pow(j as u32))
    |

Check warning on line 935 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:935:39
    |
935 |         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 903 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:903:39
    |
903 |         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 875 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:875:19
    |
875 |             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 840 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:840:13
    |
840 |             (*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 547 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:547:16
    |
547 |             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);
    |