From 20ea9fd3c6592b7e656e020863d614b16aa092ea Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 30 Mar 2024 23:12:05 +0100 Subject: [PATCH] feat: use generics Signed-off-by: kjuulh --- crates/cuddle-ci/src/cli.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/cuddle-ci/src/cli.rs b/crates/cuddle-ci/src/cli.rs index cf1d07a..f4df074 100644 --- a/crates/cuddle-ci/src/cli.rs +++ b/crates/cuddle-ci/src/cli.rs @@ -45,17 +45,17 @@ impl CuddleCI { } } - pub fn with_pull_request( + pub fn with_pull_request( &mut self, - pr: Arc>, + pr: T, ) -> &mut Self { - self.pr_action.push(pr); + self.pr_action.push(Arc::new(Mutex::new(pr))); self } - pub fn with_main(&mut self, main: Arc>) -> &mut Self { - self.main_action.push(main); + pub fn with_main(&mut self, main: T) -> &mut Self { + self.main_action.push(Arc::new(Mutex::new(main))); self }