From 610157c8ace799d87a3207f8f06d7786288d4e46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 12:49:54 +0000 Subject: [PATCH] fix(rust-guard): remove redundant match arm and unused MEDIUM_BUFFER_SIZE re-export In collaborator_permission_floor (helpers.rs), collapse the dead same value. Add an inline comment to preserve the intent. In labels/mod.rs, remove the speculative MEDIUM_BUFFER_SIZE re-export that was never consumed externally (backend.rs already imports it directly from super::constants). Deletes the #[allow(unused_imports)] suppression alongside it. Closes #3691 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- guards/github-guard/rust-guard/src/labels/helpers.rs | 3 +-- guards/github-guard/rust-guard/src/labels/mod.rs | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/guards/github-guard/rust-guard/src/labels/helpers.rs b/guards/github-guard/rust-guard/src/labels/helpers.rs index 2ec0c61e..3cb25097 100644 --- a/guards/github-guard/rust-guard/src/labels/helpers.rs +++ b/guards/github-guard/rust-guard/src/labels/helpers.rs @@ -1269,8 +1269,7 @@ pub fn collaborator_permission_floor( match normalized.as_str() { "admin" | "maintain" | "write" => writer_integrity(scope, ctx), "triage" | "read" => reader_integrity(scope, ctx), - "none" => vec![], - _ => vec![], + _ => vec![], // "none" or any unrecognised value → no integrity } } diff --git a/guards/github-guard/rust-guard/src/labels/mod.rs b/guards/github-guard/rust-guard/src/labels/mod.rs index 88d38cc7..efd10c42 100644 --- a/guards/github-guard/rust-guard/src/labels/mod.rs +++ b/guards/github-guard/rust-guard/src/labels/mod.rs @@ -34,10 +34,6 @@ mod response_items; mod response_paths; pub mod tool_rules; -// Re-export commonly used items for backward compatibility -#[allow(unused_imports)] -pub use constants::MEDIUM_BUFFER_SIZE; - // Re-export helpers - these are part of the public API and used by tests // The unused_imports warning is suppressed because these are intentionally // re-exported for external modules and tests, not used within mod.rs itself