v0.3.9-pre.002-fix.002

This commit is contained in:
2026-09-04 14:29:24 +02:00
parent 156d237460
commit 84647c12ea
6 changed files with 141 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-worker-api/src/snapshot.rs
// version: 2
// version: 3
/// Monotone sequence attached to one latest-value Worker snapshot stream.
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
@@ -37,6 +37,11 @@ impl crate::WorkerSnapshotSequence {
pub const fn is_after(&self, observed: Self) -> bool {
return self.0 > observed.0;
}
#[cfg(test)]
const fn exhausted_for_test() -> Self {
return Self(u64::MAX);
}
}
/// Fixed common latest-value snapshot exposed by every Worker implementation.
@@ -130,7 +135,7 @@ pub trait WorkerSnapshotSource: std::marker::Send + std::marker::Sync {
#[cfg(test)]
fn exhausted_snapshot_sequence() -> crate::WorkerSnapshotSequence {
return crate::WorkerSnapshotSequence(u64::MAX);
return crate::WorkerSnapshotSequence::exhausted_for_test();
}
#[cfg(test)]