fix(daemon): gate NullSnapshotStore behind cfg(test) — silence release dead_code warning

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 16:34:10 +07:00
parent 0275c64ace
commit 3317b24d18
+4 -1
View File
@@ -17,8 +17,11 @@ pub enum SnapshotMsg {
Remove(SurfaceId), 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; pub struct NullSnapshotStore;
#[cfg(test)]
impl SnapshotStore for NullSnapshotStore { impl SnapshotStore for NullSnapshotStore {
fn save(&self, _sid: &SurfaceId, _snap: &Snapshot) {} fn save(&self, _sid: &SurfaceId, _snap: &Snapshot) {}
fn load(&self, _sid: &SurfaceId) -> Option<Snapshot> { None } fn load(&self, _sid: &SurfaceId) -> Option<Snapshot> { None }