From 199563550dd41c3dfb703bd3747604a8a03cdbc5 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 11 Jun 2026 14:20:49 +0200 Subject: 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)` --- crates/turtle/src/atuin_server/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/turtle/src/atuin_server/mod.rs') 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(settings: Settings, addr: SocketAddr) -> Result<()> { +pub(crate) async fn launch(settings: Settings, addr: SocketAddr) -> Result<()> { launch_with_tcp_listener::( settings, TcpListener::bind(addr) @@ -42,7 +42,7 @@ pub async fn launch(settings: Settings, addr: SocketAddr) -> Resul .await } -pub async fn launch_with_tcp_listener( +pub(crate) async fn launch_with_tcp_listener( settings: Settings, listener: TcpListener, shutdown: impl Future + Send + 'static, @@ -58,7 +58,7 @@ pub async fn launch_with_tcp_listener( // 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")?; -- cgit v1.3.1