From 022b5ee9040c4cd560b3248146d41b243ddb38c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Casta=C3=B1o=20Arteaga?= Date: Fri, 25 Aug 2023 14:00:18 +0200 Subject: [PATCH] Make clippy and rustfmt happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sergio CastaƱo Arteaga --- clowarden-core/src/github.rs | 4 +++- clowarden-core/src/services/github/service.rs | 4 +++- clowarden-core/src/services/github/state.rs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/clowarden-core/src/github.rs b/clowarden-core/src/github.rs index 54becf9..0154c7a 100644 --- a/clowarden-core/src/github.rs +++ b/clowarden-core/src/github.rs @@ -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 { diff --git a/clowarden-core/src/services/github/service.rs b/clowarden-core/src/services/github/service.rs index 59257a4..32cb6bc 100644 --- a/clowarden-core/src/services/github/service.rs +++ b/clowarden-core/src/services/github/service.rs @@ -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 { diff --git a/clowarden-core/src/services/github/state.rs b/clowarden-core/src/services/github/state.rs index 2f01999..1cb6532 100644 --- a/clowarden-core/src/services/github/state.rs +++ b/clowarden-core/src/services/github/state.rs @@ -722,7 +722,7 @@ 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}*")?; } } @@ -730,7 +730,7 @@ impl Change for RepositoryChange { 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}*")?; } }