From 3317b24d18ed38bf6680e282af57e4b1dd30c6db Mon Sep 17 00:00:00 2001 From: Vassiliy Yegorov Date: Mon, 15 Jun 2026 16:34:10 +0700 Subject: [PATCH] =?UTF-8?q?fix(daemon):=20gate=20NullSnapshotStore=20behin?= =?UTF-8?q?d=20cfg(test)=20=E2=80=94=20silence=20release=20dead=5Fcode=20w?= =?UTF-8?q?arning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/spaceshd/src/snapshot_store.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/spaceshd/src/snapshot_store.rs b/crates/spaceshd/src/snapshot_store.rs index 137c630..5bfe239 100644 --- a/crates/spaceshd/src/snapshot_store.rs +++ b/crates/spaceshd/src/snapshot_store.rs @@ -17,8 +17,11 @@ pub enum SnapshotMsg { Remove(SurfaceId), } -/// A no-op store for tests and contexts that do not persist snapshots. +/// A no-op store for tests that do not persist snapshots. Test-only — gated so +/// release builds don't warn about an unconstructed struct. +#[cfg(test)] pub struct NullSnapshotStore; +#[cfg(test)] impl SnapshotStore for NullSnapshotStore { fn save(&self, _sid: &SurfaceId, _snap: &Snapshot) {} fn load(&self, _sid: &SurfaceId) -> Option { None }