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_client/auth.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/turtle/src/atuin_client/auth.rs') diff --git a/crates/turtle/src/atuin_client/auth.rs b/crates/turtle/src/atuin_client/auth.rs index b770c488..b260d433 100644 --- a/crates/turtle/src/atuin_client/auth.rs +++ b/crates/turtle/src/atuin_client/auth.rs @@ -15,7 +15,7 @@ use crate::atuin_client::settings::Settings; static APP_USER_AGENT: &str = concat!("atuin/", env!("CARGO_PKG_VERSION")); /// Result of an auth operation that may require 2FA. -pub enum AuthResponse { +pub(crate) enum AuthResponse { /// Operation succeeded; for login/register, contains the session token. /// `auth_type` indicates the kind of token: `Some("hub")` for Hub API /// tokens (prefixed `atapi_`), `Some("cli")` for legacy CLI session @@ -30,7 +30,7 @@ pub enum AuthResponse { } /// Result of a mutating account operation that may require 2FA. -pub enum MutateResponse { +pub(crate) enum MutateResponse { /// Operation completed successfully. Success, /// Two-factor authentication is required; the caller should prompt for a @@ -43,7 +43,7 @@ pub enum MutateResponse { /// CLI commands use this trait so they don't need to know which backend is /// active — they just prompt for input and call these methods. #[async_trait] -pub trait AuthClient: Send + Sync { +pub(crate) trait AuthClient: Send + Sync { /// Log in with username + password, optionally providing a TOTP code. async fn login(&self, username: &str, password: &str) -> Result; @@ -67,7 +67,7 @@ pub trait AuthClient: Send + Sync { } /// Resolve the appropriate [`AuthClient`] for the current settings. -pub async fn auth_client(settings: &Settings) -> Box { +pub(crate) async fn auth_client(settings: &Settings) -> Box { Box::new(LegacyAuthClient::new( &settings.sync_address, settings.session_token().await.ok(), @@ -80,7 +80,7 @@ pub async fn auth_client(settings: &Settings) -> Box { // Legacy backend — talks to the Rust sync server // --------------------------------------------------------------------------- -pub struct LegacyAuthClient { +pub(crate) struct LegacyAuthClient { address: String, session_token: Option, connect_timeout: u64, @@ -88,7 +88,7 @@ pub struct LegacyAuthClient { } impl LegacyAuthClient { - pub fn new( + pub(crate) fn new( address: &str, session_token: Option, connect_timeout: u64, -- cgit v1.3.1