Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirko-von-Leipzig committed Jul 28, 2023
1 parent b4b184e commit ec2b38d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/storage/src/schema/revision_0039.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub(crate) fn migrate(tx: &rusqlite::Transaction<'_>) -> anyhow::Result<()> {
.prepare("UPDATE headers SET state_commitment = ? WHERE number = ?")
.context("Preparing commitment writer statement")?;

let mut rows = reader
let rows = reader
.query_map([start], |row| {
let number: u64 = row.get(0).unwrap();
let storage: Vec<u8> = row.get(1).unwrap();
Expand All @@ -87,7 +87,7 @@ pub(crate) fn migrate(tx: &rusqlite::Transaction<'_>) -> anyhow::Result<()> {
.context("Querying commitments")?;

const GLOBAL_STATE_VERSION: Felt = pathfinder_common::felt_bytes!(b"STARKNET_STATE_V0");
while let Some(row) = rows.next() {
for row in rows {
let (number, storage, class) = row.context("Iterating over rows")?;

let storage = Felt::from_be_slice(&storage).context("Parsing storage commitment bytes")?;
Expand Down

0 comments on commit ec2b38d

Please sign in to comment.