From e3d942bc620c830c5992f24435fecd29fdb0f2f9 Mon Sep 17 00:00:00 2001 From: pxp9 <48651252+pxp9@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:15:07 +0200 Subject: [PATCH] I think this may be a Rust compiler issue, but I fixed it so I will take it --- fang/src/asynk/backend_sqlx/mysql.rs | 53 +++++++++++++++++++++------- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/fang/src/asynk/backend_sqlx/mysql.rs b/fang/src/asynk/backend_sqlx/mysql.rs index dba82d3..f7c6044 100644 --- a/fang/src/asynk/backend_sqlx/mysql.rs +++ b/fang/src/asynk/backend_sqlx/mysql.rs @@ -130,8 +130,12 @@ impl FangQueryable for BackendSqlXMySQL { let query_params = QueryParams::builder().uuid(&uuid).build(); - let task: Task = - Self::find_task_by_id(FIND_TASK_BY_ID_QUERY_MYSQL, pool, query_params).await?; + let task: Task = >::find_task_by_id( + FIND_TASK_BY_ID_QUERY_MYSQL, + pool, + query_params, + ) + .await?; Ok(task) } @@ -169,8 +173,12 @@ impl FangQueryable for BackendSqlXMySQL { let query_params = QueryParams::builder().uuid(params.uuid.unwrap()).build(); - let task: Task = - Self::find_task_by_id(FIND_TASK_BY_ID_QUERY_MYSQL, pool, query_params).await?; + let task: Task = >::find_task_by_id( + FIND_TASK_BY_ID_QUERY_MYSQL, + pool, + query_params, + ) + .await?; Ok(task) } @@ -214,8 +222,12 @@ impl FangQueryable for BackendSqlXMySQL { let query_params = QueryParams::builder().uuid(&uuid).build(); - let task: Task = - Self::find_task_by_id(FIND_TASK_BY_ID_QUERY_MYSQL, pool, query_params).await?; + let task: Task = >::find_task_by_id( + FIND_TASK_BY_ID_QUERY_MYSQL, + pool, + query_params, + ) + .await?; Ok(task) } @@ -254,8 +266,12 @@ impl FangQueryable for BackendSqlXMySQL { let query_params = QueryParams::builder().uuid(&id).build(); - let failed_task: Task = - Self::find_task_by_id(FIND_TASK_BY_ID_QUERY_MYSQL, pool, query_params).await?; + let failed_task: Task = >::find_task_by_id( + FIND_TASK_BY_ID_QUERY_MYSQL, + pool, + query_params, + ) + .await?; Ok(failed_task) } @@ -300,8 +316,12 @@ impl FangQueryable for BackendSqlXMySQL { let query_params = QueryParams::builder().uuid(&uuid).build(); - let failed_task: Task = - Self::find_task_by_id(FIND_TASK_BY_ID_QUERY_MYSQL, pool, query_params).await?; + let failed_task: Task = >::find_task_by_id( + FIND_TASK_BY_ID_QUERY_MYSQL, + pool, + query_params, + ) + .await?; Ok(failed_task) } @@ -311,9 +331,18 @@ impl FangQueryable for BackendSqlXMySQL { pool: &Pool, params: QueryParams<'_>, ) -> Result { - match Self::find_task_by_uniq_hash(queries.0, pool, ¶ms).await { + match >::find_task_by_uniq_hash( + queries.0, pool, ¶ms, + ) + .await + { Some(task) => Ok(task), - None => Self::insert_task_uniq(queries.1, pool, params).await, + None => { + >::insert_task_uniq( + queries.1, pool, params, + ) + .await + } } }