Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit c9a63f6

Browse files
rylevMark-Simulacrum
authored andcommitted
Fix clippy error
Signed-off-by: Ryan Levick <[email protected]>
1 parent 2219bb5 commit c9a63f6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/github/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,9 @@ fn calculate_permission_diffs(
520520
}
521521
// Bot permissions
522522
let bots = expected_repo.bots.iter().filter_map(|b| {
523-
let Some(bot_name) = bot_name(b) else {
524-
return None;
525-
};
526-
actual_teams.remove(bot_name);
527-
Some((bot_name, RepoPermission::Write))
523+
let bot_user_name = bot_user_name(b)?;
524+
actual_teams.remove(bot_user_name);
525+
Some((bot_user_name, RepoPermission::Write))
528526
});
529527
// Member permissions
530528
let members = expected_repo
@@ -579,7 +577,7 @@ fn calculate_permission_diffs(
579577
}
580578

581579
/// Returns `None` if the bot is not an actual bot user, but rather a GitHub app.
582-
fn bot_name(bot: &Bot) -> Option<&str> {
580+
fn bot_user_name(bot: &Bot) -> Option<&str> {
583581
match bot {
584582
Bot::Bors => Some("bors"),
585583
Bot::Highfive => Some("rust-highfive"),

0 commit comments

Comments
 (0)