fix clippy (#1664)

This commit is contained in:
Svyatoslav Nikolsky
2022-11-28 13:22:17 +03:00
committed by Bastian Köcher
parent 7b74940539
commit c03d99cd09
+4 -3
View File
@@ -124,9 +124,10 @@ pub fn abort_when_account_balance_decreased<C: ChainWithBalances>(
let current_time = env.now(); let current_time = env.now();
// remember balances that are beyound 24h border // remember balances that are beyound 24h border
let time_border = current_time - DAY; if let Some(time_border) = current_time.checked_sub(DAY) {
while balances.front().map(|(time, _)| *time < time_border).unwrap_or(false) { while balances.front().map(|(time, _)| *time < time_border).unwrap_or(false) {
balances.pop_front(); balances.pop_front();
}
} }
// read balance of the account // read balance of the account