Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions guards/github-guard/rust-guard/src/labels/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines 1269 to +1272
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The PR/issue description states the pre-change "none" => vec![] match arm was unreachable due to the wildcard arm below it. In Rust, match arms are evaluated top-to-bottom, so the explicit "none" arm was reachable; it was redundant (same behavior as _), not dead/unreachable. Consider updating the PR description (and/or commit message) to avoid documenting incorrect Rust match semantics.

Copilot uses AI. Check for mistakes.
}
}

Expand Down
4 changes: 0 additions & 4 deletions guards/github-guard/rust-guard/src/labels/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading