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/fetch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fetch.rs') diff --git a/src/fetch.rs b/src/fetch.rs index fd9a661..98876bc 100644 --- a/src/fetch.rs +++ b/src/fetch.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use crate::error::{Error, Result}; -pub(crate) enum Body { +enum Body { File(std::fs::File), Http(Box), } @@ -18,7 +18,7 @@ impl Read for Body { } /// Only `get` in this file opens a fetch result; the bare word `open` elsewhere is a variable, not this function. -pub(crate) fn open(url: &str) -> Result<(Body, Option)> { +fn open(url: &str) -> Result<(Body, Option)> { if let Some(path) = url.strip_prefix("file://") { let p = path.trim_start_matches('/'); let p = PathBuf::from(format!("/{p}")); -- cgit v1.2.3