File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2446,7 +2446,7 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
2446
2446
/// # Platform-specific behavior
2447
2447
///
2448
2448
/// This function currently corresponds to the `rename` function on Unix
2449
- /// and the `SetFileInformationByHandle` function on Windows.
2449
+ /// and the `MoveFileExW` or ` SetFileInformationByHandle` function on Windows.
2450
2450
///
2451
2451
/// Because of this, the behavior when both `from` and `to` exist differs. On
2452
2452
/// Unix, if `from` is a directory, `to` must also be an (empty) directory. If
Original file line number Diff line number Diff line change @@ -1284,7 +1284,7 @@ pub fn rename(old: &Path, new: &Path) -> io::Result<()> {
1284
1284
unsafe {
1285
1285
file_rename_info = alloc ( layout) . cast :: < c:: FILE_RENAME_INFO > ( ) ;
1286
1286
if file_rename_info. is_null ( ) {
1287
- handle_alloc_error ( layout ) ;
1287
+ return Err ( io :: ErrorKind :: OutOfMemory . into ( ) ) ;
1288
1288
}
1289
1289
1290
1290
( & raw mut ( * file_rename_info) . Anonymous ) . write ( c:: FILE_RENAME_INFO_0 {
You can’t perform that action at this time.
0 commit comments