Apply Lint

This commit is contained in:
Sik Yoon 2023-07-16 02:08:28 +09:00
parent 0779d3794f
commit 593d963af3
3 changed files with 3 additions and 3 deletions

View File

@ -939,7 +939,7 @@ pub async fn update_profit_percent() {
.to_f64() .to_f64()
.unwrap() .unwrap()
* 100.0; * 100.0;
if profit_percent == f64::NAN { if profit_percent.is_nan() {
profit_percent = 0.0; profit_percent = 0.0;
} }
} }

View File

@ -5308,7 +5308,7 @@ pub async fn strategist_014(
if signal_opinions[0].opinion.contains("UP") if signal_opinions[0].opinion.contains("UP")
&& market_cap_index[1].market_cap_index.is_sign_negative() && market_cap_index[1].market_cap_index.is_sign_negative()
{ {
filtered_2nd_symbols = filtered_2nd_symbols; filtered_3rd_symbols = filtered_2nd_symbols;
} else { } else {
for symbol in filtered_2nd_symbols { for symbol in filtered_2nd_symbols {
let rsi3_1d_option = alldata.rsi3_1d_data.iter().position(|x| *x.0 == *symbol); let rsi3_1d_option = alldata.rsi3_1d_data.iter().position(|x| *x.0 == *symbol);

View File

@ -83,7 +83,7 @@ pub async fn bollingerband(
); );
match result { match result {
Ok(T) => { Ok(T) => {
if T >= 0 && T <= ma_number - 1 { if T <= ma_number - 1 {
let mut read_data_iter = let mut read_data_iter =
read_sma_data_vec[sma_index].1.iter(); read_sma_data_vec[sma_index].1.iter();
for _ in T..ma_number - 1 { for _ in T..ma_number - 1 {