Skip to content

Commit c2acbe6

Browse files
committed
bootstrap: std::io::ErrorKind::CrossesDevices is finally stable
1 parent f6cb952 commit c2acbe6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/bootstrap/src/utils/helpers.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,7 @@ pub fn symlink_dir(config: &Config, original: &Path, link: &Path) -> io::Result<
173173
/// copy and remove the file otherwise
174174
pub fn move_file<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()> {
175175
match fs::rename(&from, &to) {
176-
// FIXME: Once `ErrorKind::CrossesDevices` is stabilized use
177-
// if e.kind() == io::ErrorKind::CrossesDevices {
178-
#[cfg(unix)]
179-
Err(e) if e.raw_os_error() == Some(libc::EXDEV) => {
176+
Err(e) if e.kind() == io::ErrorKind::CrossesDevices => {
180177
std::fs::copy(&from, &to)?;
181178
std::fs::remove_file(&from)
182179
}

0 commit comments

Comments
 (0)