Enable clippy's useless_let_if_seq linter (#7220)

Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
Justin Traglia
2024-03-19 11:33:22 -05:00
committed by GitHub
parent 1bf5d6a53a
commit 709d8a16d3
12 changed files with 56 additions and 44 deletions

View File

@ -45,12 +45,13 @@ impl Compact for AccountBeforeTx {
let address = Address::from_slice(&buf[..20]);
buf.advance(20);
let mut info = None;
if len - 20 > 0 {
let info = if len - 20 > 0 {
let (acc, advanced_buf) = Account::from_compact(buf, len - 20);
buf = advanced_buf;
info = Some(acc);
}
Some(acc)
} else {
None
};
(Self { address, info }, buf)
}