reth-bench: rm redundant clone (#11829)

This commit is contained in:
nk_ysg
2024-10-17 18:59:27 +08:00
committed by GitHub
parent f8902b59f5
commit b77265e61b
2 changed files with 2 additions and 4 deletions

View File

@ -37,9 +37,8 @@ pub struct Command {
impl Command {
/// Execute `benchmark new-payload-fcu` command
pub async fn execute(self, _ctx: CliContext) -> eyre::Result<()> {
let cloned_args = self.benchmark.clone();
let BenchContext { benchmark_mode, block_provider, auth_provider, mut next_block } =
BenchContext::new(&cloned_args, self.rpc_url).await?;
BenchContext::new(&self.benchmark, self.rpc_url).await?;
let (sender, mut receiver) = tokio::sync::mpsc::channel(1000);
tokio::task::spawn(async move {

View File

@ -35,11 +35,10 @@ pub struct Command {
impl Command {
/// Execute `benchmark new-payload-only` command
pub async fn execute(self, _ctx: CliContext) -> eyre::Result<()> {
let cloned_args = self.benchmark.clone();
// TODO: this could be just a function I guess, but destructuring makes the code slightly
// more readable than a 4 element tuple.
let BenchContext { benchmark_mode, block_provider, auth_provider, mut next_block } =
BenchContext::new(&cloned_args, self.rpc_url).await?;
BenchContext::new(&self.benchmark, self.rpc_url).await?;
let (sender, mut receiver) = tokio::sync::mpsc::channel(1000);
tokio::task::spawn(async move {