Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
c38062bb46
commit
20ea9fd3c6
@ -45,17 +45,17 @@ impl CuddleCI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_pull_request(
|
pub fn with_pull_request<T: PullRequestAction + Send + Sync + 'static>(
|
||||||
&mut self,
|
&mut self,
|
||||||
pr: Arc<Mutex<dyn PullRequestAction + Send + Sync>>,
|
pr: T,
|
||||||
) -> &mut Self {
|
) -> &mut Self {
|
||||||
self.pr_action.push(pr);
|
self.pr_action.push(Arc::new(Mutex::new(pr)));
|
||||||
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_main(&mut self, main: Arc<Mutex<dyn MainAction + Send + Sync>>) -> &mut Self {
|
pub fn with_main<T: MainAction + Send + Sync + 'static>(&mut self, main: T) -> &mut Self {
|
||||||
self.main_action.push(main);
|
self.main_action.push(Arc::new(Mutex::new(main)));
|
||||||
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user