From 8d6bf1c8d3285a0ea1b3fecb95e70baaae88e161 Mon Sep 17 00:00:00 2001 From: Mirko von Leipzig Date: Fri, 28 Jul 2023 15:56:04 +0200 Subject: [PATCH] chore: clippy --- crates/storage/src/schema/revision_0039.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/storage/src/schema/revision_0039.rs b/crates/storage/src/schema/revision_0039.rs index 589d95e00a..5ad1696031 100644 --- a/crates/storage/src/schema/revision_0039.rs +++ b/crates/storage/src/schema/revision_0039.rs @@ -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 = row.get(1).unwrap(); @@ -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")?;