fix: satisfy clippy 1.97 lints failing on CI

- sanitize_current_ratio: and_then if/else -> filter
- screener/graph sorts: sort_by with reversed cmp -> sort_by_key(Reverse)
- insert_ksei_holdings_rows: manual Result match -> ?

Fixes the Clippy step on ubuntu-latest (rust 1.97) that the nix
toolchain (1.93.1) did not flag.
This commit is contained in:
hermes 2026-07-31 12:14:58 +00:00
commit 09f7fe420c
4 changed files with 5 additions and 14 deletions

View file

@ -184,13 +184,7 @@ fn normalize_percentish(value: Option<f64>) -> Option<f64> {
}
fn sanitize_current_ratio(value: Option<f64>) -> Option<f64> {
value.and_then(|number| {
if !number.is_finite() || number < 0.01 {
None
} else {
Some(number)
}
})
value.filter(|number| number.is_finite() && *number >= 0.01)
}
fn round_price(value: f64) -> i64 {