From 7babfbddafa6141c68dd44517bfd845474283b3d Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Tue, 21 Nov 2023 09:19:51 +0000 Subject: [PATCH] chore: applying clippy suggestions Signed-off-by: Alex Jones --- src/analyze/mod.rs | 4 ++-- src/analyzer/ebs_analyzer.rs | 4 ++-- src/analyzer/ec2_snapshot_analyzer.rs | 2 +- src/analyzer/eip_analzyer.rs | 2 +- src/analyzer/rds_analyzer.rs | 4 ++-- src/analyzer/s3_analyzer.rs | 2 +- src/analyzer/sg_analyzer.rs | 2 +- src/analyzer/sts_analyzer.rs | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/analyze/mod.rs b/src/analyze/mod.rs index 423adb2..84f1cea 100644 --- a/src/analyze/mod.rs +++ b/src/analyze/mod.rs @@ -78,7 +78,7 @@ pub async fn run_analysis( } } })); - count = count + 1; + count += 1; } None => println!("analyzer of type not found"), } @@ -98,7 +98,7 @@ pub async fn run_analysis( pb.set_prefix(format!("[{}/{}]", count + 1, alen)); pb.set_message(format!("Starting {} analyzer", current_analyzer.get_name())); - count = count + 1; + count += 1; let thread_tx = tx.clone(); tasks.push(tokio::spawn(async move { let response = current_analyzer.run().await; diff --git a/src/analyzer/ebs_analyzer.rs b/src/analyzer/ebs_analyzer.rs index c0ebddb..ceed830 100644 --- a/src/analyzer/ebs_analyzer.rs +++ b/src/analyzer/ebs_analyzer.rs @@ -1,9 +1,9 @@ use crate::analyzer::analyzer_trait; use crate::analyzer::analyzer_trait::Analyzer; use crate::analyzer::types::AnalysisResults; -use crate::utils; + use async_trait::async_trait; -use aws_sdk_ec2; + use aws_types::sdk_config::SdkConfig; pub struct EbsAnalyzer { diff --git a/src/analyzer/ec2_snapshot_analyzer.rs b/src/analyzer/ec2_snapshot_analyzer.rs index dfcbbfe..3c9a74b 100644 --- a/src/analyzer/ec2_snapshot_analyzer.rs +++ b/src/analyzer/ec2_snapshot_analyzer.rs @@ -2,7 +2,7 @@ use crate::analyzer::analyzer_trait; use crate::analyzer::analyzer_trait::Analyzer; use crate::analyzer::types::AnalysisResults; use async_trait::async_trait; -use aws_sdk_ec2; + use aws_sdk_ec2::types::{Filter, PermissionGroup, SnapshotAttributeName}; use aws_types::sdk_config::SdkConfig; diff --git a/src/analyzer/eip_analzyer.rs b/src/analyzer/eip_analzyer.rs index ab699c3..e494432 100644 --- a/src/analyzer/eip_analzyer.rs +++ b/src/analyzer/eip_analzyer.rs @@ -2,7 +2,7 @@ use crate::analyzer::analyzer_trait; use crate::analyzer::analyzer_trait::Analyzer; use crate::analyzer::types::AnalysisResults; use async_trait::async_trait; -use aws_sdk_ec2; + use aws_types::sdk_config::SdkConfig; pub struct EipAnalyzer { diff --git a/src/analyzer/rds_analyzer.rs b/src/analyzer/rds_analyzer.rs index 28bc9ee..6f08969 100644 --- a/src/analyzer/rds_analyzer.rs +++ b/src/analyzer/rds_analyzer.rs @@ -1,9 +1,9 @@ use crate::analyzer::analyzer_trait; use crate::analyzer::analyzer_trait::Analyzer; use crate::analyzer::types::AnalysisResults; -use crate::utils; + use async_trait::async_trait; -use aws_sdk_rds; + use aws_types::sdk_config::SdkConfig; pub struct RDSAnalyzer { diff --git a/src/analyzer/s3_analyzer.rs b/src/analyzer/s3_analyzer.rs index cd31648..d9e17d9 100644 --- a/src/analyzer/s3_analyzer.rs +++ b/src/analyzer/s3_analyzer.rs @@ -1,7 +1,7 @@ use crate::analyzer::analyzer_trait; use crate::analyzer::analyzer_trait::Analyzer; use crate::analyzer::types::AnalysisResults; -use crate::utils; + use async_trait::async_trait; use aws_types::sdk_config::SdkConfig; use serde::{Deserialize, Serialize}; diff --git a/src/analyzer/sg_analyzer.rs b/src/analyzer/sg_analyzer.rs index 93d53a0..222a700 100644 --- a/src/analyzer/sg_analyzer.rs +++ b/src/analyzer/sg_analyzer.rs @@ -1,7 +1,7 @@ use crate::analyzer::analyzer_trait; use crate::analyzer::types::AnalysisResults; use async_trait::async_trait; -use aws_sdk_ec2; + use aws_types::sdk_config::SdkConfig; use colored::Colorize; diff --git a/src/analyzer/sts_analyzer.rs b/src/analyzer/sts_analyzer.rs index df20f90..1694d38 100644 --- a/src/analyzer/sts_analyzer.rs +++ b/src/analyzer/sts_analyzer.rs @@ -4,7 +4,7 @@ use crate::analyzer::types::AnalysisResults; use async_trait::async_trait; use aws_types::sdk_config::SdkConfig; -use aws_types; + use crate::utils;