summaryrefslogtreecommitdiffstats
path: root/tokio-io
diff options
context:
space:
mode:
authorIvan Petkov <ivanppetkov@gmail.com>2019-08-18 14:38:55 -0700
committerCarl Lerche <me@carllerche.com>2019-08-18 14:38:54 -0700
commit68d5fcb8d154309ba5abeaf8f092835ff3fa7c52 (patch)
tree53fcca866e2f5ff84a70aca963ca8fadc7f65ac2 /tokio-io
parent08b07afbd9beb8d92c7aeb0cf07e56d065a73726 (diff)
docs: fix all rustdoc warnings (#1474)
Diffstat (limited to 'tokio-io')
-rw-r--r--tokio-io/src/async_read.rs2
-rw-r--r--tokio-io/src/io/buf_reader.rs3
-rw-r--r--tokio-io/src/io/buf_writer.rs2
-rw-r--r--tokio-io/src/io/flush.rs2
-rw-r--r--tokio-io/src/io/mod.rs38
-rw-r--r--tokio-io/src/io/read_exact.rs4
-rw-r--r--tokio-io/src/io/shutdown.rs2
7 files changed, 3 insertions, 50 deletions
diff --git a/tokio-io/src/async_read.rs b/tokio-io/src/async_read.rs
index 2fbac2ad..97ca2b93 100644
--- a/tokio-io/src/async_read.rs
+++ b/tokio-io/src/async_read.rs
@@ -59,7 +59,7 @@ pub trait AsyncRead {
///
/// This function is called from [`poll_read_buf`].
///
- /// [`io::Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+ /// [`io::Read`]: std::io::Read
/// [`poll_read_buf`]: #method.poll_read_buf
unsafe fn prepare_uninitialized_buffer(&self, buf: &mut [u8]) -> bool {
for x in buf {
diff --git a/tokio-io/src/io/buf_reader.rs b/tokio-io/src/io/buf_reader.rs
index b8347d09..7f0fdd7c 100644
--- a/tokio-io/src/io/buf_reader.rs
+++ b/tokio-io/src/io/buf_reader.rs
@@ -22,9 +22,6 @@ use std::{cmp, fmt};
/// When the `BufReader` is dropped, the contents of its buffer will be
/// discarded. Creating multiple instances of a `BufReader` on the same
/// stream can cause data loss.
-///
-/// [`AsyncRead`]: tokio_io::AsyncRead
-///
// TODO: Examples
pub struct BufReader<R> {
inner: R,
diff --git a/tokio-io/src/io/buf_writer.rs b/tokio-io/src/io/buf_writer.rs
index c91cb6fd..438bc653 100644
--- a/tokio-io/src/io/buf_writer.rs
+++ b/tokio-io/src/io/buf_writer.rs
@@ -24,7 +24,7 @@ use std::task::{Context, Poll};
/// stream can cause data loss. If you need to write out the contents of its
/// buffer, you must manually call flush before the writer is dropped.
///
-/// [`AsyncWrite`]: tokio_io::AsyncWrite
+/// [`AsyncWrite`]: AsyncWrite
/// [`flush`]: super::AsyncWriteExt::flush
///
// TODO: Examples
diff --git a/tokio-io/src/io/flush.rs b/tokio-io/src/io/flush.rs
index 6be90fcc..6a78fb3c 100644
--- a/tokio-io/src/io/flush.rs
+++ b/tokio-io/src/io/flush.rs
@@ -7,8 +7,6 @@ use std::task::{Context, Poll};
/// A future used to fully flush an I/O object.
///
/// Created by the [`AsyncWriteExt::flush`] function.
-///
-/// [`flush`]: fn.flush.html
#[derive(Debug)]
pub struct Flush<'a, A: ?Sized> {
a: &'a mut A,
diff --git a/tokio-io/src/io/mod.rs b/tokio-io/src/io/mod.rs
index 8e05bb08..888f6548 100644
--- a/tokio-io/src/io/mod.rs
+++ b/tokio-io/src/io/mod.rs
@@ -1,41 +1,3 @@
-//! Asynchronous I/O.
-//!
-//! This module is the asynchronous version of `std::io`. Primarily, it
-//! defines two traits, [`AsyncRead`] and [`AsyncWrite`], which extend the
-//! `Read` and `Write` traits of the standard library.
-//!
-//! # AsyncRead and AsyncWrite
-//!
-//! [`AsyncRead`] and [`AsyncWrite`] must only be implemented for
-//! non-blocking I/O types that integrate with the futures type system. In
-//! other words, these types must never block the thread, and instead the
-//! current task is notified when the I/O resource is ready.
-//!
-//! # Standard input and output
-//!
-//! Tokio provides asynchronous APIs to standard [input], [output], and [error].
-//! These APIs are very similar to the ones provided by `std`, but they also
-//! implement [`AsyncRead`] and [`AsyncWrite`].
-//!
-//! Unlike *most* other Tokio APIs, the standard input / output APIs
-//! **must** be used from the context of the Tokio runtime as they require
-//! Tokio specific features to function.
-//!
-//! [input]: fn.stdin.html
-//! [output]: fn.stdout.html
-//! [error]: fn.stderr.html
-//!
-//! # `std` re-exports
-//!
-//! Additionally, [`Error`], [`ErrorKind`], and [`Result`] are re-exported
-//! from `std::io` for ease of use.
-//!
-//! [`AsyncRead`]: trait.AsyncRead.html
-//! [`AsyncWrite`]: trait.AsyncWrite.html
-//! [`Error`]: struct.Error.html
-//! [`ErrorKind`]: enum.ErrorKind.html
-//! [`Result`]: type.Result.html
-
mod async_buf_read_ext;
mod async_read_ext;
mod async_write_ext;
diff --git a/tokio-io/src/io/read_exact.rs b/tokio-io/src/io/read_exact.rs
index 6a616b97..28b65118 100644
--- a/tokio-io/src/io/read_exact.rs
+++ b/tokio-io/src/io/read_exact.rs
@@ -9,9 +9,7 @@ use std::task::{Context, Poll};
/// A future which can be used to easily read exactly enough bytes to fill
/// a buffer.
///
-/// Created by the [`read_exact`] function.
-///
-/// [`read_exact`]: fn.read_exact.html
+/// Created by the [`AsyncRead::read_exact`].
pub(crate) fn read_exact<'a, A>(reader: &'a mut A, buf: &'a mut [u8]) -> ReadExact<'a, A>
where
A: AsyncRead + Unpin + ?Sized,
diff --git a/tokio-io/src/io/shutdown.rs b/tokio-io/src/io/shutdown.rs
index f22c6e55..5bc216e4 100644
--- a/tokio-io/src/io/shutdown.rs
+++ b/tokio-io/src/io/shutdown.rs
@@ -7,8 +7,6 @@ use std::task::{Context, Poll};
/// A future used to shutdown an I/O object.
///
/// Created by the [`AsyncWriteExt::shutdown`] function.
-///
-/// [`shutdown`]: fn.shutdown.html
#[derive(Debug)]
pub struct Shutdown<'a, A: ?Sized> {
a: &'a mut A,