]> git.lizzy.rs Git - rust.git/commitdiff
Update fs.rs
authorJeremy Soller <jackpot51@gmail.com>
Thu, 13 Jul 2017 02:40:43 +0000 (20:40 -0600)
committerGitHub <noreply@github.com>
Thu, 13 Jul 2017 02:40:43 +0000 (20:40 -0600)
src/libstd/sys/redox/fs.rs

index 87e50c40148325c7783abe172a7c3bdf1a151aa6..27ded432b95651d07bc15fa2bc5ef66aa9c4b8bc 100644 (file)
@@ -384,8 +384,9 @@ pub fn unlink(p: &Path) -> io::Result<()> {
 }
 
 pub fn rename(_old: &Path, _new: &Path) -> io::Result<()> {
-    ::sys_common::util::dumb_print(format_args!("Rename\n"));
-    unimplemented!();
+    copy(old, new)?;
+    unlink(old)?;
+    Ok(())
 }
 
 pub fn set_perm(p: &Path, perm: FilePermissions) -> io::Result<()> {