Skip to content

Commit

Permalink
fs: small documentation fixes (#3133)
Browse files Browse the repository at this point in the history
  • Loading branch information
nylonicious committed Nov 12, 2020
1 parent 6a0e23c commit 685da8d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions tokio/src/fs/copy.rs
Original file line number Diff line number Diff line change
@@ -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
///
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion tokio/src/fs/read_to_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
4 changes: 3 additions & 1 deletion tokio/src/fs/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 685da8d

Please sign in to comment.