From 4ddf9c23deed93e5815d90d2780978d1ae20fc22 Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Fri, 5 Sep 2025 16:52:33 +0200 Subject: [PATCH] core/pager: assert-ready-page-sanity fmt for jussi --- core/storage/pager.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/storage/pager.rs b/core/storage/pager.rs index 16c3ec83b..6dcc1ef5d 100644 --- a/core/storage/pager.rs +++ b/core/storage/pager.rs @@ -1137,11 +1137,19 @@ impl Pager { let page_key = PageCacheKey::new(page_idx); if let Some(page) = page_cache.get(&page_key) { tracing::trace!("read_page(page_idx = {}) = cached", page_idx); - turso_assert!(page_idx == page.get().id, "attempted to read page {page_idx} but got page {}", page.get().id); + turso_assert!( + page_idx == page.get().id, + "attempted to read page {page_idx} but got page {}", + page.get().id + ); return Ok((page.clone(), None)); } let (page, c) = self.read_page_no_cache(page_idx, None, false)?; - turso_assert!(page_idx == page.get().id, "attempted to read page {page_idx} but got page {}", page.get().id); + turso_assert!( + page_idx == page.get().id, + "attempted to read page {page_idx} but got page {}", + page.get().id + ); self.cache_insert(page_idx, page.clone(), &mut page_cache)?; Ok((page, Some(c))) }