diff options
| author | aur-build <aur-build@localhost> | 2026-11-18 18:41:27 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-18 18:41:27 +0000 |
| commit | 76a214ed4d82d8937a3ec38c27d4d59304b8fac3 (patch) | |
| tree | 4a81e60b8f40fb3e9838c8e7f5ab7c361049dbeb /testcorpus/epoch-bump/PKGBUILD | |
| parent | 1abce8ba992353bca3d7b64b2633a15136e9303b (diff) | |
| download | aur-build-76a214ed4d82d8937a3ec38c27d4d59304b8fac3.tar.gz aur-build-76a214ed4d82d8937a3ec38c27d4d59304b8fac3.zip | |
http: routes split by direction of travel
n-4. `routes.rs` was 1,065 lines with the routing table, twenty-odd page
renderers, every mutating POST, and the size/date formatting helpers in one
file, so finding where a form landed meant scrolling past everything that did
not touch it.
It is a module now: `routes/mod.rs` keeps the gate, the login handlers, the
routing table and the helpers two files share (207 lines); `routes/pages.rs`
holds the read side, which only ever goes through `db.read`; `routes/mutations.rs`
holds the write side, which is where the audit writes and the flash messages
live. The split is by *read versus write*, which is the distinction the crate
actually cares about — the read path uses the thread-local read-only connection
and must never reach the writer — so the file boundary now matches the invariant
rather than being an arbitrary line count.
Behaviour is unchanged: the handlers are the same functions, re-exported into
`routes` so the routing table still reads as one flat list of endpoints.
Diffstat (limited to 'testcorpus/epoch-bump/PKGBUILD')
0 files changed, 0 insertions, 0 deletions
