fs: small documentation fixes (#3133)

This commit is contained in:
Nylonicious
2020-11-12 10:24:13 +01:00
committed by GitHub
parent 6a0e23c654
commit 685da8dadd
4 changed files with 12 additions and 5 deletions
+5 -2
View File
@@ -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
///
+1 -1
View File
@@ -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;
+3 -1
View File
@@ -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
///
+3 -1
View File
@@ -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
///