Skip to content

Commit

Permalink
or_default()
Browse files Browse the repository at this point in the history
  • Loading branch information
aisrael committed Mar 17, 2024
1 parent 86f2e10 commit ec27439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ghctl/repo/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ impl RepoConfig {
if let Some(teams) = self.teams.as_ref() {
let org = orgs_teams
.entry(owner.to_string())
.unwrap_or_default(HashMap::new);
.or_default();

for (team_slug, permission) in teams {
debug!("Validating permission {permission}");
Expand Down Expand Up @@ -663,7 +663,7 @@ impl RepoConfig {
} else {
let teams = orgs_teams
.entry(org.to_string())
.unwrap_or_default(HashMap::new);
.or_default();
if !teams.contains_key(team_slug) {
debug!("Validating team {team_slug}");
let team = octocrab.teams(org).get(team_slug).await?;
Expand Down

0 comments on commit ec27439

Please sign in to comment.