Skip to content

Commit

Permalink
chore: Fix clippy lint suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Sep 29, 2024
1 parent 51cc6cc commit 5010855
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
17 changes: 7 additions & 10 deletions eksup/src/finding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,13 @@ pub(crate) trait _Deprecation {
/// Codes that represent the finding variants
///
/// This is useful for a few reasons:
/// 1. It would allow users to add codes to a 'ignore list' in the future, to ignore any
/// reported findings of that code type (another level of granularity of what data is
/// is most relevant to them)
/// 2. It provides a "marker" that can be used to link to documentation for the finding,
/// keeping the direct output concise while still providing the means for a full explanation
/// and reasoning behind the finding in one location
/// 3. It provides a strongly typed link between code and finding data allowing the code
/// to uniquely represent a finding even if the finding data is generic (i.e. - as is the case
/// in reporting available IPs as subnet findings, the data shape is generic by the finding
/// is unique to different scenarios)
/// 1. It would allow users to add codes to a 'ignore list' in the future, to ignore any reported findings of that code
/// type (another level of granularity of what data is is most relevant to them)
/// 2. It provides a "marker" that can be used to link to documentation for the finding, keeping the direct output
/// concise while still providing the means for a full explanation and reasoning behind the finding in one location
/// 3. It provides a strongly typed link between code and finding data allowing the code to uniquely represent a finding
/// even if the finding data is generic (i.e. - as is the case in reporting available IPs as subnet findings, the
/// data shape is generic by the finding is unique to different scenarios)
#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum Code {
/// AWS finding codes not specific to EKS
Expand Down
1 change: 0 additions & 1 deletion eksup/src/k8s/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use anyhow::{Context, Result};
use k8s_openapi::api::{
apps, batch,
core::{self, v1::PodTemplateSpec},
policy,
};
use kube::{api::Api, Client, CustomResource};
use schemars::JsonSchema;
Expand Down
9 changes: 3 additions & 6 deletions eksup/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,9 @@ async fn get_config(region: &Option<String>, profile: &Option<String>) -> Result

let mut creds = DefaultCredentialsChain::builder().region(region.clone());

match profile {
Some(profile) => {
creds = creds.profile_name(profile);
}
None => {}
}
if let Some(profile) = profile {
creds = creds.profile_name(profile);
};

let config = aws_config::from_env()
.credentials_provider(creds.build().await)
Expand Down

0 comments on commit 5010855

Please sign in to comment.