Skip to content

Commit

Permalink
fix: remove unwrap to prevent panic
Browse files Browse the repository at this point in the history
  • Loading branch information
peyha committed Mar 6, 2024
1 parent 6fb34d0 commit ee0b6ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/freeze/src/datasets/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub(crate) fn process_block<TX>(block: Block<TX>, columns: &mut Blocks, schema:
block
.other
.get_with("blobGasUsed", |x| u64::from_str_radix(
x.as_str().unwrap().trim_start_matches("0x"),
x.as_str().unwrap_or("0x").trim_start_matches("0x"),
16
)
.ok())
Expand All @@ -132,7 +132,7 @@ pub(crate) fn process_block<TX>(block: Block<TX>, columns: &mut Blocks, schema:
block
.other
.get_with("excessBlobGas", |x| u64::from_str_radix(
x.as_str().unwrap().trim_start_matches("0x"),
x.as_str().unwrap_or("0x").trim_start_matches("0x"),
16
)
.ok())
Expand Down

0 comments on commit ee0b6ef

Please sign in to comment.