Skip to content

Commit

Permalink
Make clippy and rustfmt happy
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
  • Loading branch information
tegioz committed Aug 25, 2023
1 parent 31b3e4c commit 022b5ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion clowarden-core/src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ impl GHApi {

let credentials = if let Some(inst_id) = inst_id {
let Some(app_creds) = self.app_credentials.clone() else {
return Err(format_err!("error setting up github client: app credentials not provided"));
return Err(format_err!(
"error setting up github client: app credentials not provided"
));
};
Credentials::InstallationToken(InstallationTokenGenerator::new(inst_id, app_creds))
} else {
Expand Down
4 changes: 3 additions & 1 deletion clowarden-core/src/services/github/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ impl SvcApi {

let credentials = if let Some(inst_id) = inst_id {
let Some(app_creds) = self.app_credentials.clone() else {
return Err(format_err!("error setting up github client: app credentials not provided"));
return Err(format_err!(
"error setting up github client: app credentials not provided"
));
};
Credentials::InstallationToken(InstallationTokenGenerator::new(inst_id, app_creds))
} else {
Expand Down
4 changes: 2 additions & 2 deletions clowarden-core/src/services/github/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,15 +722,15 @@ impl Change for RepositoryChange {
if let Some(teams) = &repo.teams {
if !teams.is_empty() {
write!(s, "\n\t- Teams")?;
for (team_name, role) in teams.iter() {
for (team_name, role) in teams {
write!(s, "\n\t\t- **{team_name}**: *{role}*")?;
}
}
}
if let Some(collaborators) = &repo.collaborators {
if !collaborators.is_empty() {
write!(s, "\n\t- Collaborators")?;
for (user_name, role) in collaborators.iter() {
for (user_name, role) in collaborators {
write!(s, "\n\t\t- **{user_name}**: *{role}*")?;
}
}
Expand Down

0 comments on commit 022b5ee

Please sign in to comment.