From 063428d10124926f0c9d0ad627b97f526e0fa0fa Mon Sep 17 00:00:00 2001 From: emmmm <155267286+eeemmmmmm@users.noreply.github.com> Date: Tue, 9 Sep 2025 20:43:57 +0200 Subject: [PATCH] perf: replace format!("{}", len) with more efficient to_string() --- crates/cast/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cast/src/lib.rs b/crates/cast/src/lib.rs index ef5f343894b09..16e9d55f28a8e 100644 --- a/crates/cast/src/lib.rs +++ b/crates/cast/src/lib.rs @@ -749,7 +749,7 @@ impl> Cast

{ pub async fn codesize(&self, who: Address, block: Option) -> Result { let code = self.provider.get_code_at(who).block_id(block.unwrap_or_default()).await?.to_vec(); - Ok(format!("{}", code.len())) + Ok(code.len().to_string()) } /// # Example