[PR #142] [MERGED] chore: fix some clippy warnings #258

Closed
opened 2026-03-15 11:56:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/awslabs/iam-policy-autopilot/pull/142
Author: @adpaco-aws
Created: 2/5/2026
Status: Merged
Merged: 2/6/2026
Merged by: @adpaco-aws

Base: mainHead: remove-lints-1


📝 Commits (10+)

  • 0ccf98e chore: fix clippy lint bool_to_int_with_if
  • 5be8d35 chore: fix clippy lint assigning_clones
  • 13af029 chore: fix clippy lint uninlined_format_args
  • 885362d chore: fix clippy lint collection_is_never_read
  • f542f5c chore: fix clippy lint explicit_iter_loop
  • 0b3418a chore: fix clippy lint format_push_string
  • f6e0623 chore: fix clippy lint similar_names
  • 62ccb37 chore: fix clippy lint implicit_clone
  • f49164e chore: fix clippy lint items_after_statements
  • 13aa34f chore: fix additional implicit_clone issues with to_string

📊 Changes

39 files changed (+227 additions, -310 deletions)

View changed files

📝 Cargo.toml (+0 -8)
📝 iam-policy-autopilot-access-denied/src/aws/iam_client.rs (+10 -13)
📝 iam-policy-autopilot-access-denied/src/aws/policy_naming.rs (+3 -6)
📝 iam-policy-autopilot-access-denied/src/aws/principal.rs (+1 -2)
📝 iam-policy-autopilot-access-denied/src/aws/sts.rs (+1 -1)
📝 iam-policy-autopilot-access-denied/src/commands/plan.rs (+1 -2)
📝 iam-policy-autopilot-access-denied/src/parsing/utils.rs (+1 -1)
📝 iam-policy-autopilot-cli/src/commands.rs (+9 -9)
📝 iam-policy-autopilot-cli/src/main.rs (+15 -15)
📝 iam-policy-autopilot-cli/src/output.rs (+15 -27)
📝 iam-policy-autopilot-mcp-server/src/lib.rs (+4 -4)
📝 iam-policy-autopilot-mcp-server/src/mcp.rs (+8 -8)
📝 iam-policy-autopilot-policy-generation/build.rs (+10 -12)
📝 iam-policy-autopilot-policy-generation/src/api/common.rs (+3 -3)
📝 iam-policy-autopilot-policy-generation/src/api/generate_policies.rs (+1 -1)
📝 iam-policy-autopilot-policy-generation/src/embedded_data.rs (+5 -6)
📝 iam-policy-autopilot-policy-generation/src/enrichment/engine.rs (+4 -9)
📝 iam-policy-autopilot-policy-generation/src/enrichment/mod.rs (+1 -1)
📝 iam-policy-autopilot-policy-generation/src/enrichment/operation_fas_map.rs (+3 -4)
📝 iam-policy-autopilot-policy-generation/src/enrichment/resource_matcher.rs (+29 -38)

...and 19 more files

📄 Description

Issue #, if available: Towards #136

Description of changes: Removed these allow'd clippy lints from our Cargo.toml file and fixed them:

  • bool_to_int_with_if
  • assigning_clones
  • uninlined_format_args
  • collection_is_never_read
  • explicit_iter_loop
  • format_push_string
  • implicit_clone
  • items_after_statements

I also fixed a similar_names warnings that appeared while working on these.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/awslabs/iam-policy-autopilot/pull/142 **Author:** [@adpaco-aws](https://github.com/adpaco-aws) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/6/2026 **Merged by:** [@adpaco-aws](https://github.com/adpaco-aws) **Base:** `main` ← **Head:** `remove-lints-1` --- ### 📝 Commits (10+) - [`0ccf98e`](https://github.com/awslabs/iam-policy-autopilot/commit/0ccf98e43d409de40ce0df7fe31d567cc6263a3e) chore: fix clippy lint bool_to_int_with_if - [`5be8d35`](https://github.com/awslabs/iam-policy-autopilot/commit/5be8d35aa488c0de178e7e60976af71c96f7d881) chore: fix clippy lint assigning_clones - [`13af029`](https://github.com/awslabs/iam-policy-autopilot/commit/13af029c23cafb26e6f5941f1874b43d078ca51f) chore: fix clippy lint uninlined_format_args - [`885362d`](https://github.com/awslabs/iam-policy-autopilot/commit/885362d791a38dfb377b3abae0110b7b64467f7a) chore: fix clippy lint collection_is_never_read - [`f542f5c`](https://github.com/awslabs/iam-policy-autopilot/commit/f542f5c5357fdf8191c05e4b3ef8f2c241c0ad4b) chore: fix clippy lint explicit_iter_loop - [`0b3418a`](https://github.com/awslabs/iam-policy-autopilot/commit/0b3418a607452a819b6a01fb2fc1faae7595cd82) chore: fix clippy lint format_push_string - [`f6e0623`](https://github.com/awslabs/iam-policy-autopilot/commit/f6e062374cfb657be11b2d780dfed47b846ecbd0) chore: fix clippy lint similar_names - [`62ccb37`](https://github.com/awslabs/iam-policy-autopilot/commit/62ccb377f8ed22a73de34e356e60b71108435236) chore: fix clippy lint implicit_clone - [`f49164e`](https://github.com/awslabs/iam-policy-autopilot/commit/f49164e263c42882cd63b142484cd556f59228aa) chore: fix clippy lint items_after_statements - [`13aa34f`](https://github.com/awslabs/iam-policy-autopilot/commit/13aa34fda630af9c56448544203944ec0ecb607d) chore: fix additional implicit_clone issues with to_string ### 📊 Changes **39 files changed** (+227 additions, -310 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.toml` (+0 -8) 📝 `iam-policy-autopilot-access-denied/src/aws/iam_client.rs` (+10 -13) 📝 `iam-policy-autopilot-access-denied/src/aws/policy_naming.rs` (+3 -6) 📝 `iam-policy-autopilot-access-denied/src/aws/principal.rs` (+1 -2) 📝 `iam-policy-autopilot-access-denied/src/aws/sts.rs` (+1 -1) 📝 `iam-policy-autopilot-access-denied/src/commands/plan.rs` (+1 -2) 📝 `iam-policy-autopilot-access-denied/src/parsing/utils.rs` (+1 -1) 📝 `iam-policy-autopilot-cli/src/commands.rs` (+9 -9) 📝 `iam-policy-autopilot-cli/src/main.rs` (+15 -15) 📝 `iam-policy-autopilot-cli/src/output.rs` (+15 -27) 📝 `iam-policy-autopilot-mcp-server/src/lib.rs` (+4 -4) 📝 `iam-policy-autopilot-mcp-server/src/mcp.rs` (+8 -8) 📝 `iam-policy-autopilot-policy-generation/build.rs` (+10 -12) 📝 `iam-policy-autopilot-policy-generation/src/api/common.rs` (+3 -3) 📝 `iam-policy-autopilot-policy-generation/src/api/generate_policies.rs` (+1 -1) 📝 `iam-policy-autopilot-policy-generation/src/embedded_data.rs` (+5 -6) 📝 `iam-policy-autopilot-policy-generation/src/enrichment/engine.rs` (+4 -9) 📝 `iam-policy-autopilot-policy-generation/src/enrichment/mod.rs` (+1 -1) 📝 `iam-policy-autopilot-policy-generation/src/enrichment/operation_fas_map.rs` (+3 -4) 📝 `iam-policy-autopilot-policy-generation/src/enrichment/resource_matcher.rs` (+29 -38) _...and 19 more files_ </details> ### 📄 Description *Issue #, if available:* Towards #136 *Description of changes:* Removed these `allow`'d `clippy` lints from our `Cargo.toml` file and fixed them: - `bool_to_int_with_if` - `assigning_clones` - `uninlined_format_args` - `collection_is_never_read` - `explicit_iter_loop` - `format_push_string` - `implicit_clone` - `items_after_statements` I also fixed a `similar_names` warnings that appeared while working on these. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:56:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/iam-policy-autopilot#258
No description provided.