diff --git a/tokio/src/fs/hard_link.rs b/tokio/src/fs/hard_link.rs index 7f4e1c5fd90..d0f6041cd9a 100644 --- a/tokio/src/fs/hard_link.rs +++ b/tokio/src/fs/hard_link.rs @@ -7,7 +7,7 @@ use std::path::Path; /// /// This is an async version of [`std::fs::hard_link`]. /// -/// The `dst` path will be a link pointing to the `src` path. Note that systems +/// The `link` path will be a link pointing to the `original` path. Note that systems /// often require these two paths to both be located on the same filesystem. /// /// # Platform-specific behavior @@ -23,7 +23,7 @@ use std::path::Path; /// This function will return an error in the following situations, but is not /// limited to just these cases: /// -/// * The `src` path is not a file or doesn't exist. +/// * The `original` path is not a file or doesn't exist. /// /// # Examples /// @@ -36,9 +36,9 @@ use std::path::Path; /// Ok(()) /// } /// ``` -pub async fn hard_link(src: impl AsRef, dst: impl AsRef) -> io::Result<()> { - let src = src.as_ref().to_owned(); - let dst = dst.as_ref().to_owned(); +pub async fn hard_link(original: impl AsRef, link: impl AsRef) -> io::Result<()> { + let original = original.as_ref().to_owned(); + let link = link.as_ref().to_owned(); - asyncify(move || std::fs::hard_link(src, dst)).await + asyncify(move || std::fs::hard_link(original, link)).await } diff --git a/tokio/src/fs/symlink.rs b/tokio/src/fs/symlink.rs index 246e17e2662..5d75046f13c 100644 --- a/tokio/src/fs/symlink.rs +++ b/tokio/src/fs/symlink.rs @@ -5,12 +5,12 @@ use std::path::Path; /// 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. /// /// This is an async version of [`std::os::unix::fs::symlink`]. -pub async fn symlink(src: impl AsRef, dst: impl AsRef) -> io::Result<()> { - let src = src.as_ref().to_owned(); - let dst = dst.as_ref().to_owned(); +pub async fn symlink(original: impl AsRef, link: impl AsRef) -> io::Result<()> { + let original = original.as_ref().to_owned(); + let link = link.as_ref().to_owned(); - asyncify(move || std::os::unix::fs::symlink(src, dst)).await + asyncify(move || std::os::unix::fs::symlink(original, link)).await } diff --git a/tokio/src/fs/symlink_dir.rs b/tokio/src/fs/symlink_dir.rs index 6753c25eb7b..0196729b383 100644 --- a/tokio/src/fs/symlink_dir.rs +++ b/tokio/src/fs/symlink_dir.rs @@ -5,15 +5,15 @@ use std::path::Path; /// Creates a new directory symlink on the filesystem. /// -/// The `dst` path will be a directory symbolic link pointing to the `src` +/// The `link` path will be a directory symbolic link pointing to the `original` /// path. /// /// This is an async version of [`std::os::windows::fs::symlink_dir`][std] /// /// [std]: https://doc.rust-lang.org/std/os/windows/fs/fn.symlink_dir.html -pub async fn symlink_dir(src: impl AsRef, dst: impl AsRef) -> io::Result<()> { - let src = src.as_ref().to_owned(); - let dst = dst.as_ref().to_owned(); +pub async fn symlink_dir(original: impl AsRef, link: impl AsRef) -> io::Result<()> { + let original = original.as_ref().to_owned(); + let link = link.as_ref().to_owned(); - asyncify(move || std::os::windows::fs::symlink_dir(src, dst)).await + asyncify(move || std::os::windows::fs::symlink_dir(original, link)).await } diff --git a/tokio/src/fs/symlink_file.rs b/tokio/src/fs/symlink_file.rs index 623352a1bda..22451b0e3fb 100644 --- a/tokio/src/fs/symlink_file.rs +++ b/tokio/src/fs/symlink_file.rs @@ -5,15 +5,15 @@ use std::path::Path; /// Creates a new file symbolic link on the filesystem. /// -/// The `dst` path will be a file symbolic link pointing to the `src` +/// The `link` path will be a file symbolic link pointing to the `original` /// path. /// /// This is an async version of [`std::os::windows::fs::symlink_file`][std] /// /// [std]: https://doc.rust-lang.org/std/os/windows/fs/fn.symlink_file.html -pub async fn symlink_file(src: impl AsRef, dst: impl AsRef) -> io::Result<()> { - let src = src.as_ref().to_owned(); - let dst = dst.as_ref().to_owned(); +pub async fn symlink_file(original: impl AsRef, link: impl AsRef) -> io::Result<()> { + let original = original.as_ref().to_owned(); + let link = link.as_ref().to_owned(); - asyncify(move || std::os::windows::fs::symlink_file(src, dst)).await + asyncify(move || std::os::windows::fs::symlink_file(original, link)).await }