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 }