diff --git a/src/github.rs b/src/github.rs index 6f531f8..42e1bb0 100644 --- a/src/github.rs +++ b/src/github.rs @@ -1,5 +1,3 @@ -use std::fmt::format; - use anyhow::{Context, Result}; use getset::Getters; use serde::Deserialize; diff --git a/src/main.rs b/src/main.rs index 4f342ae..c329db8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ -#[macro_use] extern crate getset; mod github; @@ -56,7 +55,7 @@ async fn scan_repository( let mut has_ignore_label = false; for label in pull_request.labels() { - if (ignored_labels.contains(&label.name().as_str())) { + if ignored_labels.contains(&label.name().as_str()) { info!( "Ignoring PR {}({}) as it has an ignored label ({})", pull_request.id(), @@ -67,7 +66,7 @@ async fn scan_repository( } } - if (has_ignore_label) { + if has_ignore_label { continue; } @@ -121,7 +120,7 @@ async fn main() -> Result<(), Error> { let mut pull_requests_to_review: Vec = vec![]; - for (index, repository) in repositories.iter().enumerate() { + for repository in repositories { pull_requests_to_review.append( &mut scan_repository( repository.to_string(),