Skip to content

Expose Score enum (#81) #69

Expose Score enum (#81)

Expose Score enum (#81) #69

Triggered via push May 25, 2024 02:14
Status Success
Total duration 4m 45s
Artifacts

zxcvbn.yml

on: push
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

35 warnings
the borrowed expression implements the required traits: src/scoring.rs#L1152
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
casting to the same type is unnecessary (`u64` -> `u64`): src/scoring.rs#L952
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)) |
casting to the same type is unnecessary (`u64` -> `u64`): src/scoring.rs#L935
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
casting to the same type is unnecessary (`u64` -> `u64`): src/scoring.rs#L903
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
casting the result of `i32::abs()` to u64: src/scoring.rs#L875
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
casting the result of `i32::abs()` to u64: src/scoring.rs#L840
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
manual `RangeInclusive::contains` implementation: src/scoring.rs#L547
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
used `assert_eq!` with a literal bool: src/matching/mod.rs#L1211
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); |
used `assert_eq!` with a literal bool: src/matching/mod.rs#L1085
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); |
used `assert_eq!` with a literal bool: src/matching/mod.rs#L1066
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); |
used `assert_eq!` with a literal bool: src/matching/mod.rs#L993
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); |
clippy-rustfmt
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
clippy-rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy-rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy-rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy-rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy-rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-wasm
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, jetli/wasm-pack-action@v0.3.0. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
build-wasm
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, jetli/wasm-pack-action@v0.3.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build-wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-wasm
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
build (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
build (windows-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/