Skip to content

Commit a566eb0

Browse files
MaxFangXseanmonstar
authored andcommitted
doc: minor: Fix TokioIo doc
The TokioIo docs are confusing when a user intends to use it for adapting a hyper IO trait impl to a Tokio IO trait impl. This commit updates the TokioIo docs to make clear that it is a bidirectional adapter between Tokio's and hyper's IO traits.
1 parent 564ae12 commit a566eb0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/rt/tokio.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ use pin_project_lite::pin_project;
1616
pub struct TokioExecutor {}
1717

1818
pin_project! {
19-
/// A wrapping implementing hyper IO traits for a type that
20-
/// implements Tokio's IO traits.
19+
/// A wrapper that implements Tokio's IO traits for an inner type that
20+
/// implements hyper's IO traits, or vice versa (implements hyper's IO
21+
/// traits for a type that implements Tokio's IO traits).
2122
#[derive(Debug)]
2223
pub struct TokioIo<T> {
2324
#[pin]
@@ -62,7 +63,7 @@ impl TokioExecutor {
6263
// ==== impl TokioIo =====
6364

6465
impl<T> TokioIo<T> {
65-
/// Wrap a type implementing Tokio's IO traits.
66+
/// Wrap a type implementing Tokio's or hyper's IO traits.
6667
pub fn new(inner: T) -> Self {
6768
Self { inner }
6869
}

0 commit comments

Comments
 (0)