chore: use Display when formatting addresses and hashes (#6245)

This commit is contained in:
DaniPopes
2024-01-26 15:57:08 +01:00
committed by GitHub
parent 556741abb0
commit 0aa22466d2
8 changed files with 16 additions and 20 deletions

View File

@ -210,7 +210,7 @@ impl Account {
/// In case of a mismatch, `Err(Error::Assertion)` is returned.
pub fn assert_db(&self, address: Address, tx: &impl DbTx) -> Result<(), Error> {
let account = tx.get::<tables::PlainAccountState>(address)?.ok_or_else(|| {
Error::Assertion(format!("Expected account ({address:?}) is missing from DB: {self:?}"))
Error::Assertion(format!("Expected account ({address}) is missing from DB: {self:?}"))
})?;
assert_equal(self.balance.into(), account.balance, "Balance does not match")?;