Skip to content

Commit 9a7e232

Browse files
committed
Added comment in which direction operation happens
1 parent e24fffe commit 9a7e232

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/fs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
841841
/// use std::fs;
842842
///
843843
/// # fn foo() -> std::io::Result<()> {
844-
/// try!(fs::rename("a.txt", "b.txt"));
844+
/// try!(fs::rename("a.txt", "b.txt")); // Rename a.txt to b.txt
845845
/// # Ok(())
846846
/// # }
847847
/// ```
@@ -876,7 +876,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
876876
/// use std::fs;
877877
///
878878
/// # fn foo() -> std::io::Result<()> {
879-
/// try!(fs::copy("foo.txt", "bar.txt"));
879+
/// try!(fs::copy("foo.txt", "bar.txt")); // Copy foo.txt to bar.txt
880880
/// # Ok(()) }
881881
/// ```
882882
#[stable(feature = "rust1", since = "1.0.0")]
@@ -895,7 +895,7 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
895895
/// use std::fs;
896896
///
897897
/// # fn foo() -> std::io::Result<()> {
898-
/// try!(fs::hard_link("a.txt", "b.txt"));
898+
/// try!(fs::hard_link("a.txt", "b.txt")); // Hard link a.txt to b.txt
899899
/// # Ok(())
900900
/// # }
901901
/// ```

0 commit comments

Comments
 (0)