Skip to content

Commit

Permalink
Placate clippy (#2924)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph authored Dec 29, 2023
1 parent eddfc7b commit 12ed80e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ impl Index {
Utc::now()
.round_subsecs(0)
.checked_add_signed(chrono::Duration::seconds(
10 * 60 * i64::try_from(expected_blocks)?,
10 * 60 * i64::from(expected_blocks),
))
.ok_or_else(|| anyhow!("block timestamp out of range"))?,
))
Expand Down
2 changes: 1 addition & 1 deletion src/index/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ impl<'index> Updater<'_> {
coinbase_inputs.extend(input_sat_ranges);
}

if let Some((tx, txid)) = block.txdata.get(0) {
if let Some((tx, txid)) = block.txdata.first() {
self.index_transaction_sats(
tx,
*txid,
Expand Down
2 changes: 1 addition & 1 deletion src/templates/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl BlocksHtml {
) -> Self {
Self {
last: blocks
.get(0)
.first()
.map(|(height, _)| height)
.cloned()
.unwrap_or(0),
Expand Down
2 changes: 1 addition & 1 deletion tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ fn inscription_metadata() {
.rpc_server(&rpc_server)
.run_and_deserialize_output::<Inscribe>()
.inscriptions
.get(0)
.first()
.unwrap()
.id;

Expand Down

0 comments on commit 12ed80e

Please sign in to comment.