Skip to content

Fix rust-guard-test: remove unused is_update_operation and is_create_operation#3536

Merged
lpcox merged 1 commit into
copilot/reduce-duplication-in-write-op-integrityfrom
copilot/fix-rust-guard-test-workflow
Apr 10, 2026
Merged

Fix rust-guard-test: remove unused is_update_operation and is_create_operation#3536
lpcox merged 1 commit into
copilot/reduce-duplication-in-write-op-integrityfrom
copilot/fix-rust-guard-test-workflow

Conversation

Copilot AI commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the failing rust-guard-test CI job (run) 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)

@lpcox lpcox marked this pull request as ready for review April 10, 2026 17:52
Copilot AI review requested due to automatic review settings April 10, 2026 17:52
@lpcox lpcox merged commit 81463c9 into copilot/reduce-duplication-in-write-op-integrity Apr 10, 2026
@lpcox lpcox deleted the copilot/fix-rust-guard-test-workflow branch April 10, 2026 17:52
Copilot AI restored the copilot/fix-rust-guard-test-workflow branch April 10, 2026 17:52
Copilot stopped work on behalf of lpcox due to an error April 10, 2026 17:52
Copilot AI requested a review from lpcox April 10, 2026 17:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_operation from tools.rs.
  • Deleted is_create_operation from tools.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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants