diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-02-12 19:26:54 +0100 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2021-02-25 19:52:33 +0100 |
commit | 0502ed523f052278e4d0838a71d382fdca149f74 (patch) | |
tree | cfc70df10deb4f1e67577426b493929725aa25d7 /pkgs/profpatsch/nman/nman.rs | |
parent | 4d01522cecede033667f6a8423abe3a1f4f90930 (diff) |
pkgs/profpatsch/nman: mutate PathBuf directly instead of using .join()
Should save on copying a bit.
Diffstat (limited to 'pkgs/profpatsch/nman/nman.rs')
-rw-r--r-- | pkgs/profpatsch/nman/nman.rs | 9 |
1 files changed, 4 insertions, 5 deletions
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)); |