Skip to content

Commit 81463c9

Browse files
authored
Fix rust-guard-test: remove unused is_update_operation and is_create_operation (#3536)
## Summary Fixes the failing `rust-guard-test` CI job ([run](https://github.com/github/gh-aw-mcpg/actions/runs/24255775635/job/70828032121)) by removing two unused functions from `guards/github-guard/rust-guard/src/tools.rs`. ## Root Cause The functions `is_update_operation` and `is_create_operation` were defined but never called anywhere in the codebase. With `RUSTFLAGS="-D warnings"` set in CI, the `dead_code` lint was promoted to a compile error: ``` error: function `is_update_operation` is never used error: function `is_create_operation` is never used ``` ## Changes - Removed `is_update_operation` (line 93) and `is_create_operation` (line 98) from `tools.rs` ## Verification - `cargo test --lib` — all 252 Rust tests pass - `make agent-finished` — all checks pass (format, build, lint, unit + integration tests)
2 parents 5e52164 + a3e03d6 commit 81463c9

File tree

1 file changed

+0
-10
lines changed
  • guards/github-guard/rust-guard/src

1 file changed

+0
-10
lines changed

guards/github-guard/rust-guard/src/tools.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,6 @@ pub fn is_delete_operation(tool_name: &str) -> bool {
8989
tool_name.starts_with("delete_")
9090
}
9191

92-
/// Check if a tool is an update operation
93-
pub fn is_update_operation(tool_name: &str) -> bool {
94-
tool_name.starts_with("update_")
95-
}
96-
97-
/// Check if a tool is a create operation
98-
pub fn is_create_operation(tool_name: &str) -> bool {
99-
tool_name.starts_with("create_")
100-
}
101-
10292
/// Check if a tool is a lock operation
10393
pub fn is_lock_operation(tool_name: &str) -> bool {
10494
tool_name.starts_with("lock_")

0 commit comments

Comments
 (0)