X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Flib.rs;fp=src%2Fbootstrap%2Flib.rs;h=f753720b353066bcb05a8e9889a0d97497e70587;hb=5919f62cf6681979cb5401d3907445f14d27ec8f;hp=f4abdf1cc57589e51c8c8aec36e07e48dfdecac9;hpb=c40919b7a75f93ed7ef040361e82c656d246d41e;p=rust.git diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index f4abdf1cc57..f753720b353 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -20,7 +20,6 @@ use std::collections::{HashMap, HashSet}; use std::env; use std::fs::{self, File}; -use std::io; use std::io::ErrorKind; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; @@ -1407,7 +1406,7 @@ fn copy_internal(&self, src: &Path, dst: &Path, dereference_symlinks: bool) { src = t!(fs::canonicalize(src)); } else { let link = t!(fs::read_link(src)); - t!(self.symlink_file(link, dst)); + t!(self.config.symlink_file(link, dst)); return; } } @@ -1525,14 +1524,6 @@ fn read_dir(&self, dir: &Path) -> impl Iterator { iter.map(|e| t!(e)).collect::>().into_iter() } - fn symlink_file, Q: AsRef>(&self, src: P, link: Q) -> io::Result<()> { - #[cfg(unix)] - use std::os::unix::fs::symlink as symlink_file; - #[cfg(windows)] - use std::os::windows::fs::symlink_file; - if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) } - } - /// Returns if config.ninja is enabled, and checks for ninja existence, /// exiting with a nicer error message if not. fn ninja(&self) -> bool {