forked from the-distro/ofborg
Make clippy happy
This commit is contained in:
parent
6cbaa5d5c6
commit
542e66fcf5
|
@ -148,7 +148,7 @@ impl RebuildTagger {
|
|||
Default::default()
|
||||
}
|
||||
|
||||
pub fn parse_attrs(&mut self, attrs: &Vec<PackageArch>) {
|
||||
pub fn parse_attrs(&mut self, attrs: Vec<PackageArch>) {
|
||||
let mut counter_darwin = 0;
|
||||
let mut counter_linux = 0;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ use ofborg::message::buildjob::BuildJob;
|
|||
use std::path::Path;
|
||||
use tasks::eval::{EvaluationStrategy, StepResult};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct GenericStrategy {}
|
||||
impl GenericStrategy {
|
||||
pub fn new() -> GenericStrategy {
|
||||
|
|
|
@ -36,7 +36,9 @@ pub struct NixpkgsStrategy<'a> {
|
|||
changed_paths: Option<Vec<String>>,
|
||||
touched_packages: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
impl<'a> NixpkgsStrategy<'a> {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
job: &'a EvaluationJob,
|
||||
pull: &'a hubcaps::pulls::PullRequest,
|
||||
|
@ -182,7 +184,7 @@ impl<'a> NixpkgsStrategy<'a> {
|
|||
self.record_impacted_maintainers(&dir, &attrs);
|
||||
}
|
||||
|
||||
rebuild_tags.parse_attrs(&attrs);
|
||||
rebuild_tags.parse_attrs(attrs.clone());
|
||||
}
|
||||
|
||||
update_labels(
|
||||
|
@ -193,7 +195,7 @@ impl<'a> NixpkgsStrategy<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn gist_changed_paths(&self, attrs: &Vec<PackageArch>) -> Option<String> {
|
||||
fn gist_changed_paths(&self, attrs: &[PackageArch]) -> Option<String> {
|
||||
make_gist(
|
||||
&self.gists,
|
||||
"Changed Paths",
|
||||
|
@ -206,7 +208,7 @@ impl<'a> NixpkgsStrategy<'a> {
|
|||
)
|
||||
}
|
||||
|
||||
fn record_impacted_maintainers(&self, dir: &Path, attrs: &Vec<PackageArch>) -> () {
|
||||
fn record_impacted_maintainers(&self, dir: &Path, attrs: &[PackageArch]) {
|
||||
let changed_attributes = attrs
|
||||
.iter()
|
||||
.map(|attr| attr.package.split('.').collect::<Vec<&str>>())
|
||||
|
|
|
@ -250,7 +250,7 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for EvaluationWorker<E>
|
|||
|
||||
info!("Failed to merge {}", job.pr.head_sha);
|
||||
|
||||
evaluaton_strategy.merge_conflict();
|
||||
evaluation_strategy.merge_conflict();
|
||||
|
||||
return self.actions().skip(&job);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue