From 067ac5181b5509969d078740a46929799908c101 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 6 Jun 2025 06:03:38 +0000 Subject: [PATCH] Fix cargo clippy issues --- geneit_backend/src/services/users_service.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/geneit_backend/src/services/users_service.rs b/geneit_backend/src/services/users_service.rs index e208a59..f14d859 100644 --- a/geneit_backend/src/services/users_service.rs +++ b/geneit_backend/src/services/users_service.rs @@ -10,7 +10,6 @@ use crate::utils::string_utils::rand_str; use crate::utils::time_utils::time; use bcrypt::DEFAULT_COST; use diesel::prelude::*; -use std::io::ErrorKind; /// Get the information of a user, by its id pub async fn get_by_id(id: UserID) -> anyhow::Result { @@ -25,8 +24,7 @@ pub async fn get_by_mail(mail: &str) -> anyhow::Result { /// Get the information of a user, by its password reset token pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result { if token.is_empty() { - return Err(anyhow::Error::from(std::io::Error::new( - ErrorKind::Other, + return Err(anyhow::Error::from(std::io::Error::other( "Token is empty!", ))); } @@ -46,8 +44,7 @@ pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result { /// Get the information of a user, by its account deletion token pub async fn get_by_account_delete_token(token: &str) -> anyhow::Result { if token.is_empty() { - return Err(anyhow::Error::from(std::io::Error::new( - ErrorKind::Other, + return Err(anyhow::Error::from(std::io::Error::other( "Token is empty!", ))); }