Skip to content

feat: add genkai-point-formula v3 #245

feat: add genkai-point-formula v3

feat: add genkai-point-formula v3 #245

GitHub Actions / dev clippy failed Jan 4, 2024 in 0s

dev clippy

1 error

Details

Results

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

Versions

  • rustc 1.77.0-nightly (2df6406b8 2023-12-26)
  • cargo 1.77.0-nightly (363a2d113 2023-12-22)
  • clippy 0.1.76 (2df6406 2023-12-26)

Annotations

Check failure on line 33 in src/bot/genkai_point/model.rs

See this annotation in the file changed.

@github-actions github-actions / dev clippy

use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`

error: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
  --> src/bot/genkai_point/model.rs:33:26
   |
33 |         let efficiency = efficiency.is_nan().then_some(0.0).unwrap_or(efficiency);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if efficiency.is_nan() { 0.0 } else { efficiency }`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
note: the lint level is defined here
  --> src/main.rs:1:9
   |
1  | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(clippy::obfuscated_if_else)]` implied by `#[deny(warnings)]`