From 9ae34c99d3fa65651f0f96b5bb1a7ddf049c289c Mon Sep 17 00:00:00 2001 From: Mikhail Date: Fri, 24 May 2024 10:52:53 +0200 Subject: [PATCH] Remove unused --- crates/lavina-core/src/repo/user.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/crates/lavina-core/src/repo/user.rs b/crates/lavina-core/src/repo/user.rs index 720bf8e..a5471d0 100644 --- a/crates/lavina-core/src/repo/user.rs +++ b/crates/lavina-core/src/repo/user.rs @@ -96,27 +96,6 @@ impl Storage { Ok(res.map(|(id,)| id)) } - #[tracing::instrument(skip(self), name = "Storage::retrieve_user_by_id")] - pub async fn retrieve_user_by_id(&self, name: &str) -> Result> { - let mut executor = self.conn.lock().await; - let res: Option<(u32,)> = sqlx::query_as( - " - select - u.id, - u.name - from - users u - where - u.id = ?; - ", - ) - .bind(name) - .fetch_optional(&mut *executor) - .await?; - - Ok(res.map(|(id,)| id)) - } - #[tracing::instrument(skip(self), name = "Storage::create_or_retrieve_user_id_by_name")] pub async fn create_or_retrieve_user_id_by_name(&self, name: &str) -> Result { let mut executor = self.conn.lock().await;