From 0502ed523f052278e4d0838a71d382fdca149f74 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 12 Feb 2021 19:26:54 +0100 Subject: pkgs/profpatsch/nman: mutate PathBuf directly instead of using .join() Should save on copying a bit. --- pkgs/profpatsch/nman/nman.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pkgs/profpatsch/nman') diff --git a/pkgs/profpatsch/nman/nman.rs b/pkgs/profpatsch/nman/nman.rs index 48a30e73..61bbdf48 100644 --- a/pkgs/profpatsch/nman/nman.rs +++ b/pkgs/profpatsch/nman/nman.rs @@ -164,11 +164,10 @@ fn build_man_page(drv: DrvWithOutput, section: &str, page: &str, tempdir: &TempD let first_path = build.stdout.split(|c| char::from(*c) == '\n') .next().ok_or(NmanError::Build)?; - // TODO(sterni): 😑😑😑😑😑😑😑😑😑😑😑 - let mut path = PathBuf::from(OsStr::from_bytes(first_path)) - .join("share/man") - .join(format!("man{}", section)) - .join(page); + let mut path = PathBuf::from(OsStr::from_bytes(first_path)); + path.push("share/man"); + path.push(format!("man{}", section)); + path.push(page); path.set_extension(format!("{}.gz", section)); -- cgit 1.4.1