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/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/mod.rs')
| -rw-r--r-- | crates/turtle/src/atuin_server/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/turtle/src/atuin_server/mod.rs b/crates/turtle/src/atuin_server/mod.rs index bd0f2168..ad480e1d 100644 --- a/crates/turtle/src/atuin_server/mod.rs +++ b/crates/turtle/src/atuin_server/mod.rs @@ -10,9 +10,9 @@ mod metrics; mod router; mod utils; -pub use settings::Settings; +pub(crate) use settings::Settings; -pub mod settings; +pub(crate) mod settings; use tokio::net::TcpListener; use tokio::signal; @@ -31,7 +31,7 @@ async fn shutdown_signal() { eprintln!("Shutting down gracefully..."); } -pub async fn launch<Db: Database>(settings: Settings, addr: SocketAddr) -> Result<()> { +pub(crate) async fn launch<Db: Database>(settings: Settings, addr: SocketAddr) -> Result<()> { launch_with_tcp_listener::<Db>( settings, TcpListener::bind(addr) @@ -42,7 +42,7 @@ pub async fn launch<Db: Database>(settings: Settings, addr: SocketAddr) -> Resul .await } -pub async fn launch_with_tcp_listener<Db: Database>( +pub(crate) async fn launch_with_tcp_listener<Db: Database>( settings: Settings, listener: TcpListener, shutdown: impl Future<Output = ()> + Send + 'static, @@ -58,7 +58,7 @@ pub async fn launch_with_tcp_listener<Db: Database>( // The separate listener means it's much easier to ensure metrics are not accidentally exposed to // the public. -pub async fn launch_metrics_server(host: String, port: u16) -> Result<()> { +pub(crate) async fn launch_metrics_server(host: String, port: u16) -> Result<()> { let listener = TcpListener::bind((host, port)) .await .context("failed to bind metrics tcp")?; |
