From 77aaeeb3b57625d0db85a1032ed28ac23ebcfb28 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Mon, 18 Aug 2025 16:09:54 +0400 Subject: [PATCH] fix null guards --- libsql-sys/src/wal/ffi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsql-sys/src/wal/ffi.rs b/libsql-sys/src/wal/ffi.rs index d9c6aaee07..fd3044665a 100644 --- a/libsql-sys/src/wal/ffi.rs +++ b/libsql-sys/src/wal/ffi.rs @@ -446,8 +446,8 @@ pub unsafe extern "C" fn checkpoint( _ => panic!("invalid checkpoint mode"), }; - let in_wal = (!frames_in_wal_out.is_null()).then_some(&mut *frames_in_wal_out); - let backfilled = (!checkpointed_frames_out.is_null()).then_some(&mut *checkpointed_frames_out); + let in_wal = (!frames_in_wal_out.is_null()).then(|| &mut *frames_in_wal_out); + let backfilled = (!checkpointed_frames_out.is_null()).then(|| &mut *checkpointed_frames_out); let mut db = Sqlite3Db { inner: db }; match this.checkpoint( &mut db,