From 533835c6b49111d5520ccd7a7bdd008a428b560f Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 21 Nov 2026 19:25:47 +0000 Subject: config,db,fetch,ops: eleven pub(crate) items nothing outside their own file reaches Every one of these was found by taking the marker off and asking the compiler, under both profiles, not by reading a grep. `cargo check --all-targets` builds with `test-support` on, so it never compiles the `cfg(not(test-support))` half of a feature-conditional declaration; the release check is the one that says whether that half can go private, and it refused several of them that the dev check appeared to accept. Narrowed to private: config `shared_workspace` and `store_dir` (both are the `cfg(not(test-support))` twin of a `pub` that only tests reach), db `state_col`, `start`, `call`, `send`, fetch `Body` and `open`, ops `build_success_rate`, `STAGING_GRACE_SECS` and `sweep_staging`. Refused, and now argued in the budget file rather than left unexplained: `EvictPlan`, because `plan_retention` is `pub(crate)` and returns `Vec`, so a private row type is `error: type EvictPlan is private` at `usecase/maintenance.rs:23` where the Vec is bound. `Readers`, `OpenReview` and `ReviewSubject` are the same story in `db`. priv 170 -> 159, overwide 27 -> 22. `cargo check` clean under both profiles with no new warnings, including no new dead_code; `cargo test --test architecture` 16 passed. --- src/db/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/db/mod.rs') diff --git a/src/db/mod.rs b/src/db/mod.rs index bf54be1..4379a5f 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -99,7 +99,7 @@ pub use world::put_world_snapshot; #[cfg(feature = "test-support")] pub use world::world_members; -pub(crate) fn state_col(col: usize, text: &str) -> rusqlite::Result { +fn state_col(col: usize, text: &str) -> rusqlite::Result { T::parse(text).ok_or_else(|| { rusqlite::Error::FromSqlConversionFailure( col, @@ -196,7 +196,7 @@ pub struct Writer { impl Writer { /// Only `Writer::open` in this module starts a writer. - pub(crate) fn start(path: &Path) -> Result { + fn start(path: &Path) -> Result { let conn = open(path, false)?; let (tx, rx) = unbounded::(); let alive = Arc::new(AtomicBool::new(true)); @@ -229,7 +229,7 @@ impl Writer { self.alive.load(Ordering::SeqCst) } - pub(crate) fn call(&self, f: impl FnOnce(&mut Connection) -> Result + Send + 'static) -> Result + fn call(&self, f: impl FnOnce(&mut Connection) -> Result + Send + 'static) -> Result where T: Send + 'static, { @@ -259,7 +259,7 @@ impl Writer { }) } - pub(crate) fn send(&self, f: BoxedCall) -> Result<()> { + fn send(&self, f: BoxedCall) -> Result<()> { if !self.is_alive() { return Err(Error::db("writer actor gone")); } -- cgit v1.2.3