File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 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> {
24462446/// # Platform-specific behavior
24472447///
24482448/// 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.
24502450///
24512451/// Because of this, the behavior when both `from` and `to` exist differs. On
24522452/// 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<()> {
12841284 unsafe {
12851285 file_rename_info = alloc ( layout) . cast :: < c:: FILE_RENAME_INFO > ( ) ;
12861286 if file_rename_info. is_null ( ) {
1287- handle_alloc_error ( layout ) ;
1287+ return Err ( io :: ErrorKind :: OutOfMemory . into ( ) ) ;
12881288 }
12891289
12901290 ( & raw mut ( * file_rename_info) . Anonymous ) . write ( c:: FILE_RENAME_INFO_0 {
You can’t perform that action at this time.
0 commit comments