From c259a15f704fbd7f011a4dd5324d83798f8d0545 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 27 Jul 2025 14:16:42 +0300 Subject: [PATCH] buildFHSEnv: clippy --- .../rootfs-builder/src/main.rs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/build-fhsenv-bubblewrap/rootfs-builder/src/main.rs b/pkgs/build-support/build-fhsenv-bubblewrap/rootfs-builder/src/main.rs index bb323e71bd55..ab11ba807350 100644 --- a/pkgs/build-support/build-fhsenv-bubblewrap/rootfs-builder/src/main.rs +++ b/pkgs/build-support/build-fhsenv-bubblewrap/rootfs-builder/src/main.rs @@ -141,7 +141,7 @@ fn collect_candidate_paths( // could be a broken symlink, that's fine, we still want to handle those Some(_) => e .path() - .ok_or_else(|| anyhow!("I/O error when walking {path:?}"))? + .ok_or_else(|| anyhow!("I/O error when walking {}", path.display()))? .into(), None => { // symlink loop @@ -263,12 +263,20 @@ fn build_env(out: &Path, plan: HashMap) -> anyhow::Result<()> .parent() .ok_or(anyhow!("destination directory is root")) .with_context(|| { - format!("When trying to determine destination directory for {full_dest:?}") + format!( + "When trying to determine destination directory for {}", + full_dest.display() + ) })?; fs::create_dir_all(dest_dir) - .with_context(|| format!("When trying to create directory {dest_dir:?}"))?; - ufs::symlink(&src, &full_dest) - .with_context(|| format!("When symlinking {src:?} to {full_dest:?}"))?; + .with_context(|| format!("When trying to create directory {}", dest_dir.display()))?; + ufs::symlink(&src, &full_dest).with_context(|| { + format!( + "When symlinking {} to {}", + src.display(), + full_dest.display() + ) + })?; } let marker = out.join(FHSENV_MARKER_FILE); @@ -298,7 +306,7 @@ fn main() -> anyhow::Result<()> { paths = extend_to_closure(paths, &refs)?; paths32 = extend_to_closure(paths32, &refs)?; - }; + } let plan = build_plan(paths, paths32)?;