1
Fork 0

Disambiguate symlink argument names

This commit is contained in:
David Tolnay 2020-11-14 14:40:08 -08:00
parent 98d66340d6
commit 29128a5aa2
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
9 changed files with 67 additions and 60 deletions

View file

@ -841,7 +841,7 @@ impl DirEntryExt for fs::DirEntry {
/// Creates a new symbolic link on the filesystem.
///
/// The `dst` path will be a symbolic link pointing to the `src` path.
/// The `link` path will be a symbolic link pointing to the `original` path.
///
/// # Examples
///
@ -854,8 +854,8 @@ impl DirEntryExt for fs::DirEntry {
/// }
/// ```
#[stable(feature = "symlink", since = "1.1.0")]
pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()> {
sys::fs::symlink(src.as_ref(), dst.as_ref())
pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Result<()> {
sys::fs::symlink(original.as_ref(), link.as_ref())
}
/// Unix-specific extensions to [`fs::DirBuilder`].