fix "error: trait objects without an explicit dyn are deprecated"
This commit is contained in:
parent
88b2c5edeb
commit
19e343301f
|
@ -11,7 +11,7 @@ pub struct NotifyWorker<T: SimpleNotifyWorker> {
|
||||||
pub trait SimpleNotifyWorker {
|
pub trait SimpleNotifyWorker {
|
||||||
type J;
|
type J;
|
||||||
|
|
||||||
fn consumer(&self, job: &Self::J, notifier: &mut NotificationReceiver);
|
fn consumer(&self, job: &Self::J, notifier: &mut dyn NotificationReceiver);
|
||||||
|
|
||||||
fn msg_to_job(
|
fn msg_to_job(
|
||||||
&self,
|
&self,
|
||||||
|
|
|
@ -110,7 +110,7 @@ type Package = String;
|
||||||
type Architecture = String;
|
type Architecture = String;
|
||||||
type OutPath = String;
|
type OutPath = String;
|
||||||
|
|
||||||
pub fn parse_lines(data: &mut BufRead) -> PackageOutPaths {
|
pub fn parse_lines(data: &mut dyn BufRead) -> PackageOutPaths {
|
||||||
data.lines()
|
data.lines()
|
||||||
.filter_map(|line| match line {
|
.filter_map(|line| match line {
|
||||||
Ok(line) => Some(line),
|
Ok(line) => Some(line),
|
||||||
|
|
|
@ -41,7 +41,7 @@ impl BuildWorker {
|
||||||
fn actions<'a, 'b>(
|
fn actions<'a, 'b>(
|
||||||
&self,
|
&self,
|
||||||
job: &'b buildjob::BuildJob,
|
job: &'b buildjob::BuildJob,
|
||||||
receiver: &'a mut notifyworker::NotificationReceiver,
|
receiver: &'a mut dyn notifyworker::NotificationReceiver,
|
||||||
) -> JobActions<'a, 'b> {
|
) -> JobActions<'a, 'b> {
|
||||||
JobActions::new(&self.system, &self.identity, job, receiver)
|
JobActions::new(&self.system, &self.identity, job, receiver)
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ impl BuildWorker {
|
||||||
pub struct JobActions<'a, 'b> {
|
pub struct JobActions<'a, 'b> {
|
||||||
system: String,
|
system: String,
|
||||||
identity: String,
|
identity: String,
|
||||||
receiver: &'a mut notifyworker::NotificationReceiver,
|
receiver: &'a mut dyn notifyworker::NotificationReceiver,
|
||||||
job: &'b buildjob::BuildJob,
|
job: &'b buildjob::BuildJob,
|
||||||
line_counter: u64,
|
line_counter: u64,
|
||||||
snippet_log: VecDeque<String>,
|
snippet_log: VecDeque<String>,
|
||||||
|
@ -66,7 +66,7 @@ impl<'a, 'b> JobActions<'a, 'b> {
|
||||||
system: &str,
|
system: &str,
|
||||||
identity: &str,
|
identity: &str,
|
||||||
job: &'b buildjob::BuildJob,
|
job: &'b buildjob::BuildJob,
|
||||||
receiver: &'a mut notifyworker::NotificationReceiver,
|
receiver: &'a mut dyn notifyworker::NotificationReceiver,
|
||||||
) -> JobActions<'a, 'b> {
|
) -> JobActions<'a, 'b> {
|
||||||
let (log_exchange, log_routing_key) = job
|
let (log_exchange, log_routing_key) = job
|
||||||
.logs
|
.logs
|
||||||
|
@ -279,7 +279,7 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
|
||||||
fn consumer(
|
fn consumer(
|
||||||
&self,
|
&self,
|
||||||
job: &buildjob::BuildJob,
|
job: &buildjob::BuildJob,
|
||||||
notifier: &mut notifyworker::NotificationReceiver,
|
notifier: &mut dyn notifyworker::NotificationReceiver,
|
||||||
) {
|
) {
|
||||||
let mut actions = self.actions(&job, notifier);
|
let mut actions = self.actions(&job, notifier);
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for EvaluationWorker<E>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut evaluation_strategy: Box<eval::EvaluationStrategy> = if job.is_nixpkgs() {
|
let mut evaluation_strategy: Box<dyn eval::EvaluationStrategy> = if job.is_nixpkgs() {
|
||||||
Box::new(eval::NixpkgsStrategy::new(
|
Box::new(eval::NixpkgsStrategy::new(
|
||||||
&job,
|
&job,
|
||||||
&pull,
|
&pull,
|
||||||
|
|
Loading…
Reference in a new issue