foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.34k stars 1.77k forks source link

refactor: simplify `merge_db_account_data` #9223

Closed Karrq closed 3 weeks ago

Karrq commented 3 weeks ago

Motivation

The merge_db_account_data function is a bit difficult to understand, the logic itself is simple but the code is rather convoluted

Solution

Refactor the function into a more idiomatic rust style, making it easy to understand what's happening at first glance