aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-02-23 02:53:56 -0500
committerJesse Luehrs <doy@tozt.net>2022-02-23 02:53:56 -0500
commit4f0b0ae8d1e3ff3c3af616e88ee7c51e583743b1 (patch)
treeaf881d51c4853786d9cd815351b9ecce8c42a351 /src
parent2b48b4b867a89fd134434437adee708c2a1a0043 (diff)
downloadttyrec-4f0b0ae8d1e3ff3c3af616e88ee7c51e583743b1.tar.gz
ttyrec-4f0b0ae8d1e3ff3c3af616e88ee7c51e583743b1.zip
move to tokio
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs6
-rw-r--r--src/reader.rs6
-rw-r--r--src/writer.rs6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d4ead83..8ef8552 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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 {