Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Mar 27, 2024
1 parent 00acb04 commit d227451
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions testool/src/statetest/yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ mod test {
statetest::{executor::StateTestError, run_test, CircuitsConfig},
};
use eth_types::{address, AccessList, AccessListItem};
use std::fmt::Display;

const TEMPLATE: &str = r#"
arith:
Expand Down Expand Up @@ -641,9 +642,9 @@ arith:
}
}
}
impl ToString for Template {
fn to_string(&self) -> String {
TEMPLATE
impl Display for Template {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let str = TEMPLATE
.replace("{{ gas_limit }}", &self.gas_limit)
.replace("{{ pre_code }}", &self.pre_code)
.replace("{{ res_storage }}", &self.res_storage)
Expand All @@ -657,7 +658,8 @@ arith:
} else {
"Istanbul"
},
)
);
write!(f, "{}", str)
}
}

Expand Down

0 comments on commit d227451

Please sign in to comment.