Commit c259a15f authored by K900's avatar K900
Browse files

buildFHSEnv: clippy

parent 246199e4
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -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<PathBuf, PathBuf>) -> 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)?;