From b13662d0ac05dbcfad996eb40dc3937d1ca6d1c8 Mon Sep 17 00:00:00 2001 From: Hironori Yamamoto Date: Sat, 30 Jul 2022 21:51:49 +0900 Subject: [PATCH 1/2] :hammer: make ci fail on clippy warning --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ef535c9..d5f4e85 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -73,4 +73,4 @@ jobs: - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features + args: --all-features -- -D warnings From 7c77a3b06c554c5148b3321229a54c2383b9519c Mon Sep 17 00:00:00 2001 From: Hironori Yamamoto Date: Sat, 30 Jul 2022 22:03:25 +0900 Subject: [PATCH 2/2] :+1: fix by clippy --- src/creds.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/creds.rs b/src/creds.rs index 82f754b..df5ecf0 100644 --- a/src/creds.rs +++ b/src/creds.rs @@ -190,11 +190,7 @@ fn parse_aws_credentials(file: &File) -> Result { .context("failed to deserialize credentials".to_string()) .map_or_else( |e| Err(ctx::CTXError::CredentialsIsBroken { source: Some(e) }), - |h| { - Ok(h.into_iter() - .map(|(k, v)| (k.to_string(), Rc::new(v))) - .collect()) - }, + |h| Ok(h.into_iter().map(|(k, v)| (k, Rc::new(v))).collect()), ) }