Skip to content

Commit 7c27d6b

Browse files
committed
Remove to_string() because type implements Display
1 parent 22faf52 commit 7c27d6b

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/async.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,7 @@ impl AsyncClient {
8787
) -> Result<Option<Txid>, Error> {
8888
let resp = self
8989
.client
90-
.get(&format!(
91-
"{}/block/{}/txid/{}",
92-
self.url,
93-
block_hash.to_string(),
94-
index
95-
))
90+
.get(&format!("{}/block/{}/txid/{}", self.url, block_hash, index))
9691
.send()
9792
.await?;
9893

src/blocking.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,7 @@ impl BlockingClient {
9292
) -> Result<Option<Txid>, Error> {
9393
let resp = self
9494
.agent
95-
.get(&format!(
96-
"{}/block/{}/txid/{}",
97-
self.url,
98-
block_hash.to_string(),
99-
index
100-
))
95+
.get(&format!("{}/block/{}/txid/{}", self.url, block_hash, index))
10196
.call();
10297

10398
match resp {

0 commit comments

Comments
 (0)