Skip to content

Commit 030f823

Browse files
committed
Merge #130: ci,msrv: pin tracing-core to 0.1.33
3178d17 ci: fix new clippy uninlined_format_args warning (Steve Myers) fd5857e ci,msrv: pin `tracing-core` to 0.1.33 (valued mammal) Pull request description: PR updates the pinned dependencies to build on MSRV. Opening this to test out the changes in CI. - pin `tracing-core` to 0.1.33 - pin `parking_lot` to 0.12.3 - pin `parking_lot_core` to 0.9.10 - pin `lock_api` to 0.4.12 ACKs for top commit: notmandatory: tACK 3178d17 Tree-SHA512: 45437008408201606da88a664ab33cb30df6e3ba2d03ec77e7c914bc527fc7cace9922f8e484467b89e9950cc3796bdea8581870af38c574da61ee23050f0a81
2 parents ecea653 + 3178d17 commit 030f823

File tree

5 files changed

+27
-19
lines changed

5 files changed

+27
-19
lines changed

.github/workflows/cont_integration.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ jobs:
6666
cargo update -p ring --precise "0.17.12"
6767
cargo update -p flate2 --precise "1.0.35"
6868
cargo update -p once_cell --precise "1.20.3"
69+
cargo update -p tracing-core --precise "0.1.33"
70+
cargo update -p parking_lot --precise "0.12.3"
71+
cargo update -p parking_lot_core --precise "0.9.10"
72+
cargo update -p lock_api --precise "0.4.12"
6973
7074
cargo update -p base64ct --precise "1.6.0" # dev-dependency
7175
cargo update -p bzip2-sys --precise "0.1.12+1.0.8" # dev-dependency

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ cargo update -p native-tls --precise "0.2.13"
3131
cargo update -p ring --precise "0.17.12"
3232
cargo update -p flate2 --precise "1.0.35"
3333
cargo update -p once_cell --precise "1.20.3"
34+
cargo update -p tracing-core --precise "0.1.33"
35+
cargo update -p parking_lot --precise "0.12.3"
36+
cargo update -p parking_lot_core --precise "0.9.10"
37+
cargo update -p lock_api --precise "0.4.12"
3438
```

src/async.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ impl<S: Sleeper> AsyncClient<S> {
419419
) -> Result<Vec<Tx>, Error> {
420420
let script_hash = sha256::Hash::hash(script.as_bytes());
421421
let path = match last_seen {
422-
Some(last_seen) => format!("/scripthash/{:x}/txs/chain/{}", script_hash, last_seen),
423-
None => format!("/scripthash/{:x}/txs", script_hash),
422+
Some(last_seen) => format!("/scripthash/{script_hash:x}/txs/chain/{last_seen}"),
423+
None => format!("/scripthash/{script_hash:x}/txs"),
424424
};
425425

426426
self.get_response_json(&path).await

src/blocking.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl BlockingClient {
197197

198198
/// Get a [`Transaction`] option given its [`Txid`]
199199
pub fn get_tx(&self, txid: &Txid) -> Result<Option<Transaction>, Error> {
200-
self.get_opt_response(&format!("/tx/{}/raw", txid))
200+
self.get_opt_response(&format!("/tx/{txid}/raw"))
201201
}
202202

203203
/// Get a [`Transaction`] given its [`Txid`].
@@ -216,44 +216,44 @@ impl BlockingClient {
216216
block_hash: &BlockHash,
217217
index: usize,
218218
) -> Result<Option<Txid>, Error> {
219-
self.get_opt_response_txid(&format!("/block/{}/txid/{}", block_hash, index))
219+
self.get_opt_response_txid(&format!("/block/{block_hash}/txid/{index}"))
220220
}
221221

222222
/// Get the status of a [`Transaction`] given its [`Txid`].
223223
pub fn get_tx_status(&self, txid: &Txid) -> Result<TxStatus, Error> {
224-
self.get_response_json(&format!("/tx/{}/status", txid))
224+
self.get_response_json(&format!("/tx/{txid}/status"))
225225
}
226226

227227
/// Get transaction info given it's [`Txid`].
228228
pub fn get_tx_info(&self, txid: &Txid) -> Result<Option<Tx>, Error> {
229-
self.get_opt_response_json(&format!("/tx/{}", txid))
229+
self.get_opt_response_json(&format!("/tx/{txid}"))
230230
}
231231

232232
/// Get a [`BlockHeader`] given a particular block hash.
233233
pub fn get_header_by_hash(&self, block_hash: &BlockHash) -> Result<BlockHeader, Error> {
234-
self.get_response_hex(&format!("/block/{}/header", block_hash))
234+
self.get_response_hex(&format!("/block/{block_hash}/header"))
235235
}
236236

237237
/// Get the [`BlockStatus`] given a particular [`BlockHash`].
238238
pub fn get_block_status(&self, block_hash: &BlockHash) -> Result<BlockStatus, Error> {
239-
self.get_response_json(&format!("/block/{}/status", block_hash))
239+
self.get_response_json(&format!("/block/{block_hash}/status"))
240240
}
241241

242242
/// Get a [`Block`] given a particular [`BlockHash`].
243243
pub fn get_block_by_hash(&self, block_hash: &BlockHash) -> Result<Option<Block>, Error> {
244-
self.get_opt_response(&format!("/block/{}/raw", block_hash))
244+
self.get_opt_response(&format!("/block/{block_hash}/raw"))
245245
}
246246

247247
/// Get a merkle inclusion proof for a [`Transaction`] with the given
248248
/// [`Txid`].
249249
pub fn get_merkle_proof(&self, txid: &Txid) -> Result<Option<MerkleProof>, Error> {
250-
self.get_opt_response_json(&format!("/tx/{}/merkle-proof", txid))
250+
self.get_opt_response_json(&format!("/tx/{txid}/merkle-proof"))
251251
}
252252

253253
/// Get a [`MerkleBlock`] inclusion proof for a [`Transaction`] with the
254254
/// given [`Txid`].
255255
pub fn get_merkle_block(&self, txid: &Txid) -> Result<Option<MerkleBlock>, Error> {
256-
self.get_opt_response_hex(&format!("/tx/{}/merkleblock-proof", txid))
256+
self.get_opt_response_hex(&format!("/tx/{txid}/merkleblock-proof"))
257257
}
258258

259259
/// Get the spending status of an output given a [`Txid`] and the output
@@ -263,7 +263,7 @@ impl BlockingClient {
263263
txid: &Txid,
264264
index: u64,
265265
) -> Result<Option<OutputStatus>, Error> {
266-
self.get_opt_response_json(&format!("/tx/{}/outspend/{}", txid, index))
266+
self.get_opt_response_json(&format!("/tx/{txid}/outspend/{index}"))
267267
}
268268

269269
/// Broadcast a [`Transaction`] to Esplora
@@ -309,7 +309,7 @@ impl BlockingClient {
309309

310310
/// Get the [`BlockHash`] of a specific block height
311311
pub fn get_block_hash(&self, block_height: u32) -> Result<BlockHash, Error> {
312-
self.get_response_str(&format!("/block-height/{}", block_height))
312+
self.get_response_str(&format!("/block-height/{block_height}"))
313313
.map(|s| BlockHash::from_str(s.as_str()).map_err(Error::HexToArray))?
314314
}
315315

@@ -354,8 +354,8 @@ impl BlockingClient {
354354
) -> Result<Vec<Tx>, Error> {
355355
let script_hash = sha256::Hash::hash(script.as_bytes());
356356
let path = match last_seen {
357-
Some(last_seen) => format!("/scripthash/{:x}/txs/chain/{}", script_hash, last_seen),
358-
None => format!("/scripthash/{:x}/txs", script_hash),
357+
Some(last_seen) => format!("/scripthash/{script_hash:x}/txs/chain/{last_seen}"),
358+
None => format!("/scripthash/{script_hash:x}/txs"),
359359
};
360360
self.get_response_json(&path)
361361
}
@@ -367,7 +367,7 @@ impl BlockingClient {
367367
/// esplora returns `10` while [mempool.space](https://mempool.space/docs/api) returns `15`.
368368
pub fn get_blocks(&self, height: Option<u32>) -> Result<Vec<BlockSummary>, Error> {
369369
let path = match height {
370-
Some(height) => format!("/blocks/{}", height),
370+
Some(height) => format!("/blocks/{height}"),
371371
None => "/blocks".to_string(),
372372
};
373373
let blocks: Vec<BlockSummary> = self.get_response_json(&path)?;

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ pub enum Error {
231231

232232
impl fmt::Display for Error {
233233
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
234-
write!(f, "{:?}", self)
234+
write!(f, "{self:?}")
235235
}
236236
}
237237

@@ -323,14 +323,14 @@ mod test {
323323

324324
let esplora_url = ELECTRSD.esplora_url.as_ref().unwrap();
325325

326-
let mut builder = Builder::new(&format!("http://{}", esplora_url));
326+
let mut builder = Builder::new(&format!("http://{esplora_url}"));
327327
if !headers.is_empty() {
328328
builder.headers = headers;
329329
}
330330

331331
let blocking_client = builder.build_blocking();
332332

333-
let builder_async = Builder::new(&format!("http://{}", esplora_url));
333+
let builder_async = Builder::new(&format!("http://{esplora_url}"));
334334

335335
#[cfg(feature = "tokio")]
336336
let async_client = builder_async.build_async().unwrap();

0 commit comments

Comments
 (0)