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/handlers/user.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/turtle/src/atuin_server/handlers/user.rs') diff --git a/crates/turtle/src/atuin_server/handlers/user.rs b/crates/turtle/src/atuin_server/handlers/user.rs index 01b72202..7708d43e 100644 --- a/crates/turtle/src/atuin_server/handlers/user.rs +++ b/crates/turtle/src/atuin_server/handlers/user.rs @@ -29,7 +29,7 @@ use reqwest::header::CONTENT_TYPE; use crate::atuin_common::{api::*, utils::crypto_random_string}; -pub fn verify_str(hash: &str, password: &str) -> bool { +pub(crate) fn verify_str(hash: &str, password: &str) -> bool { let arg2 = Argon2::new(Algorithm::Argon2id, Version::V0x13, Params::default()); let Ok(hash) = PasswordHash::new(hash) else { return false; @@ -63,7 +63,7 @@ async fn send_register_hook(url: &str, username: String, registered: String) { } #[instrument(skip_all, fields(user.username = username.as_str()))] -pub async fn get( +pub(crate) async fn get( Path(username): Path, state: State>, ) -> Result, ErrorResponseStatus<'static>> { @@ -87,7 +87,7 @@ pub async fn get( } #[instrument(skip_all)] -pub async fn register( +pub(crate) async fn register( state: State>, Json(register): Json, ) -> Result, ErrorResponseStatus<'static>> { @@ -163,7 +163,7 @@ pub async fn register( } #[instrument(skip_all, fields(user.id = user.id))] -pub async fn delete( +pub(crate) async fn delete( UserAuth(user): UserAuth, state: State>, ) -> Result, ErrorResponseStatus<'static>> { @@ -183,7 +183,7 @@ pub async fn delete( } #[instrument(skip_all, fields(user.id = user.id, change_password))] -pub async fn change_password( +pub(crate) async fn change_password( UserAuth(mut user): UserAuth, state: State>, Json(change_password): Json, @@ -213,7 +213,7 @@ pub async fn change_password( } #[instrument(skip_all, fields(user.username = login.username.as_str()))] -pub async fn login( +pub(crate) async fn login( state: State>, login: Json, ) -> Result, ErrorResponseStatus<'static>> { -- cgit v1.3.1