mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Enable clippy's useless_let_if_seq linter (#7220)
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user