From f4a1f8900a562b0eadb8ea64b532849940b4356a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 15:32:41 +0200 Subject: [PATCH] Odin: drop doc lines that restate the code they sit on One was also wrong: `records` is in key order, not the file's. Co-Authored-By: Claude Opus 5.5 --- crates/odin-daemon/src/lib.rs | 5 ----- crates/odin-daemon/src/main.rs | 8 +++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/odin-daemon/src/lib.rs b/crates/odin-daemon/src/lib.rs index 66ade96..981c65a 100644 --- a/crates/odin-daemon/src/lib.rs +++ b/crates/odin-daemon/src/lib.rs @@ -425,8 +425,6 @@ pub struct OdinStoreSnapshot { pub trait OdinTopologyStore { fn read(&self, query: OdinStoreQuery) -> Result; - /// Replace the queried incarnation's correlation, and its presence when - /// one is given. fn commit( &self, query: &OdinStoreQuery, @@ -526,7 +524,6 @@ impl MemoryOdinTopologyStore { }) } - /// Every record, in the order the file stores them. pub fn records(&self) -> Ref<'_, BTreeMap> { self.records.borrow() } @@ -553,7 +550,6 @@ impl MemoryOdinTopologyStore { } } - /// Every incarnation this store holds a correlation for. pub fn correlated_incarnations(&self) -> BTreeSet { self.records .borrow() @@ -584,7 +580,6 @@ impl MemoryOdinTopologyStore { legacy.len() } - /// Whether the records differ from what was last loaded or written. pub fn is_dirty(&self) -> bool { self.dirty.get() } diff --git a/crates/odin-daemon/src/main.rs b/crates/odin-daemon/src/main.rs index ccba290..2405c82 100644 --- a/crates/odin-daemon/src/main.rs +++ b/crates/odin-daemon/src/main.rs @@ -809,11 +809,9 @@ fn serve( ended } -/// The last write before Odin ends. `flush` makes it only while the lease is -/// still current and the file still holds what Odin wrote, so it writes -/// nothing after `WriteLeaseLost` or `ForeignStoreWrite`. A failure is logged -/// and not returned: Odin is ending either way, and the next Odin loads what -/// the file holds. +/// The last write before Odin ends, under `flush`'s own checks: after +/// `WriteLeaseLost` or `ForeignStoreWrite` it writes nothing. A failure is +/// logged, not returned: Odin is ending either way. fn stop(state: &RuntimeState) { if let Err(error) = state.flush() { eprintln!("Odin's final store write was not made: {error:#}");