diff options
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/mod.rs | 3 | ||||
| -rw-r--r-- | src/http/render.rs | 12 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 715b448..e3a2181 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -24,7 +24,6 @@ struct Req { } impl Req { - /// Read by the route handlers, which are in this module; the word `form` in a test is a local parameter. fn form(&self) -> &[(String, String)] { &self.form_pairs } @@ -114,7 +113,7 @@ mod server { } } -/// the handle to a running HTTP listener. `spawn` returns it and `main` holds it without naming the type; the test harness stores it in a field because it needs the bound address. +/// The handle to a running HTTP listener. #[cfg(feature = "test-support")] pub use server::Server; diff --git a/src/http/render.rs b/src/http/render.rs index bc2ad3d..95e6de1 100644 --- a/src/http/render.rs +++ b/src/http/render.rs @@ -23,7 +23,7 @@ mod page { } } -/// The render model's shared header. Every template and route handler that fills it lives inside `http`; the outside readers are the page tests. +/// The render model's shared header. #[cfg(feature = "test-support")] pub use page::Page; @@ -31,8 +31,6 @@ pub use page::Page; pub(crate) use page::Page; impl Page { - /// Built by the route handlers, which are in this module; nothing outside - /// `http` constructs a page header. pub(crate) fn new(title: &str, csrf: String) -> Self { Self { title: title.into(), @@ -161,7 +159,7 @@ mod panel { } } -/// A diff panel in the render model. The tests that assert on its body drive a real review and cannot move into the module. +/// A diff panel in the render model. #[cfg(feature = "test-support")] pub use panel::Panel; @@ -169,7 +167,6 @@ pub use panel::Panel; pub(crate) use panel::Panel; impl Panel { - /// Built by the route handlers, which are in this module. pub(crate) fn new(title: &str, body: String) -> Self { Self { title: title.into(), empty: body.trim().is_empty(), empty_note: "no change".into(), body } } @@ -313,9 +310,8 @@ pub(crate) struct BuildLite { } #[derive(Debug, Clone)] -/// A row of the builds table as the templates render it. Filled and read -/// entirely inside `http`; the `BuildRow` other modules name is `db::builds::BuildRow`, -/// a different type that happens to share the name. +/// A row of the builds table as the templates render it — not the same type as +/// the `db::builds::BuildRow` other modules name. pub(crate) struct BuildRow { pub id: String, pub id_short: String, |
