feat: extract arch
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-11-26 22:46:34 +01:00
parent 7a1ad63b57
commit 3c28b30f8f
4 changed files with 67 additions and 29 deletions

View File

@@ -88,25 +88,15 @@ impl DaggerMiddleware for MoldInstall {
}
pub trait MoldActionExt {
fn with_mold(
&mut self,
architecture: Architecture,
os: Os,
version: impl Into<String>,
) -> &mut Self {
fn with_mold(&mut self, version: impl Into<String>) -> &mut Self {
self
}
}
impl MoldActionExt for RustService {
fn with_mold(
&mut self,
architecture: Architecture,
os: Os,
version: impl Into<String>,
) -> &mut Self {
fn with_mold(&mut self, version: impl Into<String>) -> &mut Self {
self.with_stage(super::RustServiceStage::AfterDeps(
Box::new(MoldInstall::new(architecture, os, version))
Box::new(MoldInstall::new(self.get_arch(), self.get_os(), version))
))
}
}