From e5623023aafe6f6a2a8e850224cb7b3a88230877 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sun, 10 Nov 2024 04:46:51 +0800 Subject: [PATCH] chore: cargo clippy --- .github/workflows/integration_test.yml | 1 - libs/database/src/publish.rs | 2 +- src/biz/template/ops.rs | 5 ++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 73cc325d..b3d0e882 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -141,7 +141,6 @@ jobs: run: | git checkout main RUST_LOG="info" DISABLE_CI_TEST_LOG="true" cargo test ${{ matrix.test_cmd }} - RUST_LOG="info" DISABLE_CI_TEST_LOG="true" cargo test -p admin_frontend ${{ matrix.test_cmd }} cleanup: name: Cleanup Docker Images diff --git a/libs/database/src/publish.rs b/libs/database/src/publish.rs index 1a090a83..4e0f4c13 100644 --- a/libs/database/src/publish.rs +++ b/libs/database/src/publish.rs @@ -244,7 +244,7 @@ pub async fn insert_or_replace_publish_collabs( ) .fetch_all(txn.as_mut()) .await?; - if delete_publish_names.len() > 0 { + if !delete_publish_names.is_empty() { tracing::info!( "Deleted existing published collab record with publish names: {:?}", delete_publish_names diff --git a/src/biz/template/ops.rs b/src/biz/template/ops.rs index 0b6de412..1a830af3 100644 --- a/src/biz/template/ops.rs +++ b/src/biz/template/ops.rs @@ -10,7 +10,7 @@ use app_error::ErrorCode; use aws_sdk_s3::primitives::ByteStream; use database::{ file::{s3_client_impl::AwsS3BucketClientImpl, BucketClient, ResponseBlob}, - publish::{select_published_collab_info, select_publish_info_for_view_ids}, + publish::{select_publish_info_for_view_ids, select_published_collab_info}, template::*, }; use database_entity::dto::{ @@ -251,8 +251,7 @@ pub async fn get_templates_with_publish_info( ) .await?; let view_ids = templates.iter().map(|t| t.view_id).collect::>(); - let publish_info_for_views = - select_publish_info_for_view_ids(pg_pool, &view_ids).await?; + let publish_info_for_views = select_publish_info_for_view_ids(pg_pool, &view_ids).await?; let mut publish_info_map = publish_info_for_views .into_iter() .map(|info| (info.view_id, info))