diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-01-11 01:55:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-11 01:55:04 -0500 |
| commit | bd81023dd17c771e1db906ca22c064b019f0350f (patch) | |
| tree | 428d156fa622a9cb2167825d5dc0ae7f894eb99d | |
| parent | a2d7c8144f3f237612b37420fe2b6b08408d5b1d (diff) | |
| parent | 4ba139d4d8be7ad20689fc54d13a834a3a64f787 (diff) | |
| download | rust-bd81023dd17c771e1db906ca22c064b019f0350f.tar.gz rust-bd81023dd17c771e1db906ca22c064b019f0350f.zip | |
Rollup merge of #134074 - GrigorenkoPV:bootstrap-io-error-more, r=jieyouxu
bootstrap: `std::io::ErrorKind::CrossesDevices` is finally stable
| -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) } |
