Skip to content

Commit

Permalink
docs: 📝 explicitly link to AsyncRead and AsyncWrite trait
Browse files Browse the repository at this point in the history
explicitly link to AsyncRead and AsyncWrite traits of futures crate, since docs.rs cannot resolve the link properly (see rust-lang/docs.rs#2196)
  • Loading branch information
DerZade committed Oct 23, 2023
1 parent 4e7e5de commit 0a1e81d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl Directory {

/// Async version of [`from_reader`](Self::from_reader).
///
/// Reads a directory from a [`futures::io::AsyncRead`] and returns it.
/// Reads a directory from a [`futures::io::AsyncRead`](https://docs.rs/futures/latest/futures/io/trait.AsyncRead.html) and returns it.
///
/// # Arguments
/// * `input` - Reader including directory bytes
Expand Down Expand Up @@ -278,7 +278,7 @@ impl Directory {

/// Async version of [`to_writer`](Self::to_writer).
///
/// Writes the directory to a [`futures::io::AsyncWrite`].
/// Writes the directory to a [`futures::io::AsyncWrite`](https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html).
///
/// # Arguments
/// * `output` - Writer to write directory to
Expand Down
4 changes: 2 additions & 2 deletions src/header/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Header {

/// Async version of [`from_reader`](Self::from_reader).
///
/// Reads a header from a [`futures::io::AsyncRead`] and returns it.
/// Reads a header from a [`futures::io::AsyncRead`](https://docs.rs/futures/latest/futures/io/trait.AsyncRead.html) and returns it.
///
/// # Arguments
/// * `input` - Reader
Expand Down Expand Up @@ -169,7 +169,7 @@ impl Header {

/// Async version of [`to_writer`](Self::to_writer).
///
/// Writes the header to a [`futures::io::AsyncWrite`].
/// Writes the header to a [`futures::io::AsyncWrite`](https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html).
///
/// # Arguments
/// * `output` - Writer to write header to
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! # `PMTiles`
//!
//! A low level implementation of [the `PMTiles` format](https://github.com/protomaps/PMTiles) based on the [`std::io::Read`] and [`std::io::Write`] traits (or their respective asynchronous versions [`futures::io::AsyncRead`] and [`futures::io::AsyncWrite`]).
//! A low level implementation of [the `PMTiles` format](https://github.com/protomaps/PMTiles) based on the [`std::io::Read`] and [`std::io::Write`] traits (or their respective asynchronous versions [`futures::io::AsyncRead`](https://docs.rs/futures/latest/futures/io/trait.AsyncRead.html) and [`futures::io::AsyncWrite`](https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html)).
//!
//! ## Examples
//!
Expand Down
4 changes: 2 additions & 2 deletions src/util/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn compress<'a>(

/// Async version of [`compress`].
///
/// Returns a new instance of [`futures::io::AsyncWrite`] that will emit compressed data to the underlying writer.
/// Returns a new instance of [`futures::io::AsyncWrite`](https://docs.rs/futures/latest/futures/io/trait.AsyncWrite.html) that will emit compressed data to the underlying writer.
///
/// # Arguments
/// * `compression` - Compression to use
Expand Down Expand Up @@ -154,7 +154,7 @@ pub fn decompress<'a>(

/// Async version of [`decompress`].
///
/// Returns a new instance of [`futures::io::AsyncRead`] that will emit uncompressed data from an the underlying reader.
/// Returns a new instance of [`futures::io::AsyncRead`](https://docs.rs/futures/latest/futures/io/trait.AsyncRead.html) that will emit uncompressed data from an the underlying reader.
///
/// # Arguments
/// * `compression` - Compression to use
Expand Down

0 comments on commit 0a1e81d

Please sign in to comment.