mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
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:
parent
a5cfdd79b4
commit
09f7fe420c
4 changed files with 5 additions and 14 deletions
|
|
@ -983,10 +983,10 @@ fn sort_screener_quotes(quotes: &mut [Quote], filter: &str) {
|
|||
});
|
||||
}
|
||||
"high-volume" => {
|
||||
quotes.sort_by(|a, b| b.volume.cmp(&a.volume));
|
||||
quotes.sort_by_key(|quote| std::cmp::Reverse(quote.volume));
|
||||
}
|
||||
"large-cap" => {
|
||||
quotes.sort_by(|a, b| b.market_cap.unwrap_or(0).cmp(&a.market_cap.unwrap_or(0)));
|
||||
quotes.sort_by_key(|quote| std::cmp::Reverse(quote.market_cap.unwrap_or(0)));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue