diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 14:20:49 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 14:20:49 +0200 |
| commit | 199563550dd41c3dfb703bd3747604a8a03cdbc5 (patch) | |
| tree | 30cfa3e5539f782b7571091c742ee1c219e138fb /crates/turtle/src/atuin_server/handlers/mod.rs | |
| parent | chore: Restore db migrations (diff) | |
| download | atuin-199563550dd41c3dfb703bd3747604a8a03cdbc5.zip | |
chore: Remove all `pub`s
They will not be marked by rustc/cargo as unused, and as atuin doesn't
expose an API all of them _should_ be `pub(crate)`
Diffstat (limited to 'crates/turtle/src/atuin_server/handlers/mod.rs')
| -rw-r--r-- | crates/turtle/src/atuin_server/handlers/mod.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/turtle/src/atuin_server/handlers/mod.rs b/crates/turtle/src/atuin_server/handlers/mod.rs index 7722d03e..322324c4 100644 --- a/crates/turtle/src/atuin_server/handlers/mod.rs +++ b/crates/turtle/src/atuin_server/handlers/mod.rs @@ -4,16 +4,16 @@ use axum::{Json, extract::State, http, response::IntoResponse}; use crate::atuin_server::router::AppState; -pub mod health; -pub mod history; -pub mod record; -pub mod status; -pub mod user; -pub mod v0; +pub(crate) mod health; +pub(crate) mod history; +pub(crate) mod record; +pub(crate) mod status; +pub(crate) mod user; +pub(crate) mod v0; const VERSION: &str = env!("CARGO_PKG_VERSION"); -pub async fn index<DB: Database>(state: State<AppState<DB>>) -> Json<IndexResponse> { +pub(crate) async fn index<DB: Database>(state: State<AppState<DB>>) -> Json<IndexResponse> { let homage = r#""Through the fathomless deeps of space swims the star turtle Great A'Tuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld." -- Sir Terry Pratchett"#; let version = state @@ -34,12 +34,12 @@ impl IntoResponse for ErrorResponseStatus<'_> { } } -pub struct ErrorResponseStatus<'a> { - pub error: ErrorResponse<'a>, - pub status: http::StatusCode, +pub(crate) struct ErrorResponseStatus<'a> { + pub(crate) error: ErrorResponse<'a>, + pub(crate) status: http::StatusCode, } -pub trait RespExt<'a> { +pub(crate) trait RespExt<'a> { fn with_status(self, status: http::StatusCode) -> ErrorResponseStatus<'a>; fn reply(reason: &'a str) -> Self; } |
