docs: add missing #[must_use], # Errors, # Panics across public api

This commit is contained in:
damocles 2026-05-22 19:41:27 +02:00
commit 908cadb151
10 changed files with 157 additions and 0 deletions

View file

@ -148,6 +148,10 @@ impl TurnStats {
/// Insert a row. Best-effort — logs + swallows errors so a sqlite
/// hiccup (locked db, full disk) doesn't crash the harness.
///
/// # Panics
///
/// Panics if the internal lock is poisoned.
pub fn record(&self, row: &TurnStatRow) {
let conn = self.inner.lock().unwrap();
let res = conn.execute(
@ -209,6 +213,9 @@ impl TurnStats {
/// have last-inference zeros — those rows yield `ctx = None` so the
/// badge stays empty until the next real turn rather than showing a
/// misleading 0.
/// # Panics
///
/// Panics if the internal lock is poisoned.
#[must_use]
pub fn last_usage(
&self,