feat: use stuff
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-03-30 23:40:46 +01:00
parent c0fe864923
commit 5fb1399f0c
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394

View File

@ -43,25 +43,21 @@ impl CuddleCI {
}
}
pub fn with_pull_request<T>(&mut self, pr: impl AsRef<T>) -> &mut Self
pub fn with_pull_request<T>(&mut self, pr: &T) -> &mut Self
where
T: PullRequestAction + ToOwned + Send + Sync + 'static,
T: ToOwned<Owned = T>,
{
let pr = pr.as_ref();
self.pr_action.push(Box::new(pr.to_owned()));
self
}
pub fn with_main<T>(&mut self, main: impl AsRef<T>) -> &mut Self
pub fn with_main<T>(&mut self, main: &T) -> &mut Self
where
T: MainAction + Send + Sync + 'static,
T: ToOwned<Owned = T>,
{
let main = main.as_ref();
self.main_action.push(Box::new(main.to_owned()));
self