diff options
| author | dev <dev@example.com> | 2026-11-21 19:27:26 +0000 |
|---|---|---|
| committer | dev <dev@example.com> | 2026-11-21 19:27:26 +0000 |
| commit | 0f18ebddc1c138c531e3e331786c7fa917d9186f (patch) | |
| tree | b99428e80e267d8a1b4665b46aa67212fb42f154 /src/http/routes | |
| parent | 533835c6b49111d5520ccd7a7bdd008a428b560f (diff) | |
| download | aur-build-0f18ebddc1c138c531e3e331786c7fa917d9186f.tar.gz aur-build-0f18ebddc1c138c531e3e331786c7fa917d9186f.zip | |
http: ten request and response helpers were never crate-internal, just unmarked
`http` declares 81 `pub(crate)` items, the densest cluster in the tree, and the
census called every one of them the good state. Ten of them are not
crate-internal at all: `State`, `Req`, `Res`, `logout`, and the five accessors
on `Req` and constructors on `Res` are named only from `http/mod.rs`, the file
that declares them. The router dispatches through them in the same file; the
`pub(crate)` was describing an outside caller that does not exist.
`cookie` is the one worth naming: it is the auth-cookie helper, it looked used
from `http/routes/mod.rs`, and what is used there is a *field* named `cookie`
on `Req`. A word-match census cannot tell those apart, which is the whole
reason this pass was done by stripping markers and compiling rather than by
reading the census output.
priv 159 -> 149 (http 81 -> 71), overwide 22 -> 21. `cargo check` clean under
both profiles, no new warnings; tests/http.rs, surfaces.rs, notices.rs and
invariants.rs all pass (43 tests).
Diffstat (limited to 'src/http/routes')
| -rw-r--r-- | src/http/routes/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/routes/mod.rs b/src/http/routes/mod.rs index 0ffecb0..2b9ebb9 100644 --- a/src/http/routes/mod.rs +++ b/src/http/routes/mod.rs @@ -34,7 +34,7 @@ pub(crate) fn login_form(state: &State, req: &Req) -> Res { } /// `pub(crate)`, not `pub`: the census counted it as test-only because the word appears in `tests/http.rs`, but only inside a string — a route path, a content type, the word "redirect" in an assertion message. Nothing in the test tier calls it. -pub(crate) fn logout(req: &Req) -> Res { +fn logout(req: &Req) -> Res { if let Some(sid) = req.cookie("sid") { auth::drop_session(&sid); } |
