From 701042c8be76f27c69a7994c118c71a71b62e852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 1 Sep 2023 13:50:32 +0200 Subject: [PATCH] refactor(xtask): inline out_dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- xtask/src/artifact.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/xtask/src/artifact.rs b/xtask/src/artifact.rs index db2a5841b4..5d0dbf8642 100644 --- a/xtask/src/artifact.rs +++ b/xtask/src/artifact.rs @@ -44,13 +44,6 @@ impl Artifact { .unwrap_or_else(|| Path::new("target")) } - fn out_dir(&self, triple: impl AsRef) -> PathBuf { - let mut out_dir = self.target_dir().to_path_buf(); - out_dir.push(triple); - out_dir.push(self.profile_path_component()); - out_dir - } - pub fn builtins_archive(&self) -> Archive { let mut builtins_archive = self.target_dir().to_path_buf(); builtins_archive.push(self.arch.hermit_triple()); @@ -60,13 +53,17 @@ impl Artifact { } pub fn build_archive(&self) -> Archive { - let mut built_archive = self.out_dir(self.arch.triple()); + let mut built_archive = self.target_dir().to_path_buf(); + built_archive.push(self.arch.triple()); + built_archive.push(self.profile_path_component()); built_archive.push("libhermit.a"); built_archive.into() } pub fn dist_archive(&self) -> Archive { - let mut dist_archive = self.out_dir(self.arch.name()); + let mut dist_archive = self.target_dir().to_path_buf(); + dist_archive.push(self.arch.name()); + dist_archive.push(self.profile_path_component()); dist_archive.push("libhermit.a"); dist_archive.into() }