From 685da8dadd8821d1053ce7ecaf01ab5ee231bef9 Mon Sep 17 00:00:00 2001 From: Nylonicious <50183564+nylonicious@users.noreply.github.com> Date: Thu, 12 Nov 2020 10:24:13 +0100 Subject: fs: small documentation fixes (#3133) --- tokio/src/fs/copy.rs | 7 +++++-- tokio/src/fs/mod.rs | 2 +- tokio/src/fs/read_to_string.rs | 4 +++- tokio/src/fs/write.rs | 4 +++- 4 files changed, 12 insertions(+), 5 deletions(-) (limited to 'tokio') diff --git a/tokio/src/fs/copy.rs b/tokio/src/fs/copy.rs index d4d4d29c..2d4556f2 100644 --- a/tokio/src/fs/copy.rs +++ b/tokio/src/fs/copy.rs @@ -1,10 +1,13 @@ use crate::fs::asyncify; use std::path::Path; -/// Copies the contents of one file to another. This function will also copy the permission bits of the original file to the destination file. +/// Copies the contents of one file to another. This function will also copy the permission bits +/// of the original file to the destination file. /// This function will overwrite the contents of to. /// -/// This is the async equivalent of `std::fs::copy`. +/// This is the async equivalent of [`std::fs::copy`][std]. +/// +/// [std]: fn@std::fs::copy /// /// # Examples /// diff --git a/tokio/src/fs/mod.rs b/tokio/src/fs/mod.rs index d2757a5f..b9b0cd72 100644 --- a/tokio/src/fs/mod.rs +++ b/tokio/src/fs/mod.rs @@ -22,7 +22,7 @@ //! `std::io::ErrorKind::WouldBlock` if a *worker* thread can not be converted //! to a *backup* thread immediately. //! -//! [`AsyncRead`]: https://docs.rs/tokio-io/0.1/tokio_io/trait.AsyncRead.html +//! [`AsyncRead`]: trait@crate::io::AsyncRead mod canonicalize; pub use self::canonicalize::canonicalize; diff --git a/tokio/src/fs/read_to_string.rs b/tokio/src/fs/read_to_string.rs index c743bb4d..4f37986d 100644 --- a/tokio/src/fs/read_to_string.rs +++ b/tokio/src/fs/read_to_string.rs @@ -5,7 +5,9 @@ use std::{io, path::Path}; /// Creates a future which will open a file for reading and read the entire /// contents into a string and return said string. /// -/// This is the async equivalent of `std::fs::read_to_string`. +/// This is the async equivalent of [`std::fs::read_to_string`][std]. +/// +/// [std]: fn@std::fs::read_to_string /// /// # Examples /// diff --git a/tokio/src/fs/write.rs b/tokio/src/fs/write.rs index 0114cab8..9b6cf530 100644 --- a/tokio/src/fs/write.rs +++ b/tokio/src/fs/write.rs @@ -5,7 +5,9 @@ use std::{io, path::Path}; /// Creates a future that will open a file for writing and write the entire /// contents of `contents` to it. /// -/// This is the async equivalent of `std::fs::write`. +/// This is the async equivalent of [`std::fs::write`][std]. +/// +/// [std]: fn@std::fs::write /// /// # Examples /// -- cgit v1.2.3