Fix rust-guard-test: remove unused is_update_operation and is_create_operation#3536
Merged
lpcox merged 1 commit intoApr 10, 2026
Conversation
…rom tools.rs Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/5e165951-7335-4f8b-90ce-b565a68fb3ff Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
lpcox
April 10, 2026 17:52
View session
Copilot stopped work on behalf of
lpcox due to an error
April 10, 2026 17:52
Contributor
There was a problem hiding this comment.
Pull request overview
Removes two unused Rust helper functions to fix rust-guard-test failing under RUSTFLAGS="-D warnings" (dead_code treated as error).
Changes:
- Deleted
is_update_operationfromtools.rs. - Deleted
is_create_operationfromtools.rs.
Show a summary per file
| File | Description |
|---|---|
| guards/github-guard/rust-guard/src/tools.rs | Removes unused operation-classification helpers that trigger dead_code errors in CI. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
This was referenced Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the failing
rust-guard-testCI job (run) by removing two unused functions fromguards/github-guard/rust-guard/src/tools.rs.Root Cause
The functions
is_update_operationandis_create_operationwere defined but never called anywhere in the codebase. WithRUSTFLAGS="-D warnings"set in CI, thedead_codelint was promoted to a compile error:Changes
is_update_operation(line 93) andis_create_operation(line 98) fromtools.rsVerification
cargo test --lib— all 252 Rust tests passmake agent-finished— all checks pass (format, build, lint, unit + integration tests)