diff options
| author | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-12-09 15:35:56 +0300 |
|---|---|---|
| committer | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2025-01-09 20:21:50 +0300 |
| commit | 4ba139d4d8be7ad20689fc54d13a834a3a64f787 (patch) | |
| tree | f53b1cccedcc32acad7009f5fc08fbfaed05ba2c /src/bootstrap | |
| parent | 251206c27b619ccf3a08e2ac4c525dc343f08492 (diff) | |
bootstrap: `std::io::ErrorKind::CrossesDevices` is finally stable
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/utils/helpers.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs index 3657d9b3112..50fea43aee0 100644 --- a/src/bootstrap/src/utils/helpers.rs +++ b/src/bootstrap/src/utils/helpers.rs @@ -181,10 +181,7 @@ pub fn symlink_dir(config: &Config, original: &Path, link: &Path) -> io::Result< /// copy and remove the file otherwise pub fn move_file<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()> { match fs::rename(&from, &to) { - // FIXME: Once `ErrorKind::CrossesDevices` is stabilized use - // if e.kind() == io::ErrorKind::CrossesDevices { - #[cfg(unix)] - Err(e) if e.raw_os_error() == Some(libc::EXDEV) => { + Err(e) if e.kind() == io::ErrorKind::CrossesDevices => { std::fs::copy(&from, &to)?; std::fs::remove_file(&from) } |
