Skip to content

fix: suppress dead_code warning on is_forked_pull_request_with_callback#2118

Merged
lpcox merged 1 commit intomainfrom
fix/rust-guard-warning
Mar 18, 2026
Merged

fix: suppress dead_code warning on is_forked_pull_request_with_callback#2118
lpcox merged 1 commit intomainfrom
fix/rust-guard-warning

Conversation

@lpcox
Copy link
Collaborator

@lpcox lpcox commented Mar 18, 2026

Adds #[allow(dead_code)] to is_forked_pull_request_with_callback in backend.rs.

This function is only called from tests (same pattern as is_bot, is_owner, and is_repo_private helpers which already have the annotation).

Before: warning: function is_forked_pull_request_with_callback is never used
After: Clean build, 66 tests pass, zero warnings.

Add #[allow(dead_code)] to is_forked_pull_request_with_callback, which
is only called from tests (same pattern as is_bot and is_owner helpers).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 18, 2026 23:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR suppresses a Rust dead_code warning for a GitHub-guard labeling backend helper that is only exercised from tests, aligning it with existing helper patterns in the codebase.

Changes:

  • Added #[allow(dead_code)] to is_forked_pull_request_with_callback to eliminate unused-function warnings during non-test builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@lpcox lpcox merged commit 3b5a6ed into main Mar 18, 2026
7 checks passed
@lpcox lpcox deleted the fix/rust-guard-warning branch March 18, 2026 23:45
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.

2 participants