Skip to content

Commit

Permalink
fix(clippy): use first() instead of get(0) (#176)
Browse files Browse the repository at this point in the history
use first() instead of get(0) to remove clippy warning
  • Loading branch information
LEAFERx authored Oct 24, 2023
1 parent dd61420 commit 21ec7c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/driver/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl TryFrom<Block<Transaction>> for HeadInfo {
fn try_from(value: Block<Transaction>) -> Result<Self> {
let tx_calldata = value
.transactions
.get(0)
.first()
.ok_or(eyre::eyre!(
"Could not find the L1 attributes deposited transaction"
))?
Expand Down
2 changes: 1 addition & 1 deletion src/l1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl InnerWatcher {

let input = &block
.transactions
.get(0)
.first()
.expect(
"Could not find the L1 attributes deposited transaction in the parent L2 block",
)
Expand Down

0 comments on commit 21ec7c1

Please sign in to comment.