From 4304b0f336ddba7b4ec6780795059ff2066d105b Mon Sep 17 00:00:00 2001 From: aur-build Date: Thu, 19 Nov 2026 17:33:17 +0000 Subject: comments: keep only what the code cannot show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stripped every comment that described what an item does, documented its arguments or fields, or cited the design docs (§n, I-n, m-n, decision n). 2247 comments down to 83. What survives: the section dividers that segment the large modules, the secret-handling warnings, the agent wire-frame directions, and the few notes without which the code they attach to reads as redundant, reorderable, or unsound. --- src/time.rs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/time.rs') diff --git a/src/time.rs b/src/time.rs index b5f077e..8460f20 100644 --- a/src/time.rs +++ b/src/time.rs @@ -1,6 +1,5 @@ use chrono::{DateTime, SecondsFormat, TimeZone, Utc}; -/// Current time as a canonical DB timestamp: `2026-11-17T20:43:24Z`. pub fn now() -> String { match pinned() { Some(pinned) => pinned, @@ -8,10 +7,6 @@ pub fn now() -> String { } } -/// The instant relative arithmetic should use, which is what makes `secs_ago` -/// and `secs_ahead` honest under a pinned clock (§6 m-1): a pinned test asking -/// for a 90-second lease means 90 seconds after *the pinned instant*, not after -/// the real one. fn base() -> DateTime { match pinned().and_then(|p| parse(&p)) { Some(t) => t, @@ -31,7 +26,6 @@ thread_local! { static CLOCK: std::cell::RefCell> = const { std::cell::RefCell::new(None) }; } -/// Pin the clock for the current thread (tests only). Returns the previous value. pub fn pin(ts: &str) -> Option { CLOCK.with(|c| { let mut slot = c.borrow_mut(); @@ -58,7 +52,6 @@ pub fn delta_secs(a: &str, b: &str) -> Option { Some(parse(b)?.signed_duration_since(parse(a)?).num_seconds()) } -/// A timestamp `secs` from [`base`], canonical format. pub fn secs_ago(secs: i64) -> String { fmt(base() - chrono::Duration::seconds(secs)) } -- cgit v1.2.3