diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 6 | ||||
-rw-r--r-- | src/reader.rs | 6 | ||||
-rw-r--r-- | src/writer.rs | 6 |
3 files changed, 9 insertions, 9 deletions
@@ -7,9 +7,9 @@ //! `blocking::Writer` provide a similar API for non-asynchronous //! applications. //! -//! If you do not need the async API, the `futures` dependency can be removed -//! by building with `default_features = false` (by default, the `"async"` -//! feature is enabled). +//! # Features +//! +//! Async support via Tokio can be enabled via the `"async"` feature. #![warn(clippy::cargo)] #![warn(clippy::pedantic)] diff --git a/src/reader.rs b/src/reader.rs index 3426dcb..0b0666b 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -1,13 +1,13 @@ -use futures_lite::io::AsyncReadExt as _; +use tokio::io::AsyncReadExt as _; /// Reads ttyrec frames from a [`futures_lite::io::AsyncRead`] instance. -pub struct Reader<T: futures_lite::io::AsyncRead> { +pub struct Reader<T: tokio::io::AsyncRead> { input: T, parser: crate::Parser, buf: [u8; 4096], } -impl<T: futures_lite::io::AsyncRead + std::marker::Unpin + Send> Reader<T> { +impl<T: tokio::io::AsyncRead + std::marker::Unpin + Send> Reader<T> { /// Creates a new [`Reader`](Self) from a [`futures_lite::io::AsyncRead`] /// instance. pub fn new(input: T) -> Self { diff --git a/src/writer.rs b/src/writer.rs index 9eb3aaa..6e52db1 100644 --- a/src/writer.rs +++ b/src/writer.rs @@ -1,12 +1,12 @@ -use futures_lite::io::AsyncWriteExt as _; +use tokio::io::AsyncWriteExt as _; /// Writes ttyrec frames to a [`futures_lite::io::AsyncWrite`] instance. -pub struct Writer<T: futures_lite::io::AsyncWrite> { +pub struct Writer<T: tokio::io::AsyncWrite> { output: T, creator: crate::Creator, } -impl<T: futures_lite::io::AsyncWrite + std::marker::Unpin + Send> Writer<T> { +impl<T: tokio::io::AsyncWrite + std::marker::Unpin + Send> Writer<T> { /// Creates a new [`Writer`](Self) from a [`futures_lite::io::AsyncWrite`] /// instance. pub fn new(output: T) -> Self { |