Skip to content

Commit

Permalink
feat: futures => futures_util (fewer deps)
Browse files Browse the repository at this point in the history
closes #78
  • Loading branch information
fasterthanlime committed Mar 19, 2024
1 parent 1473dfc commit 1ff81a4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 57 deletions.
54 changes: 1 addition & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rc-zip-tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ path = "src/lib.rs"
rc-zip = { version = "5.0.1", path = "../rc-zip" }
positioned-io = { version = "0.3.3" }
tokio = { version = "1.35.1", features = ["fs", "io-util", "rt-multi-thread"] }
futures = { version = "0.3.30" }
futures-util = { version = "0.3.30" }
pin-project-lite = { version = "0.2.13" }
oval = "2.0.0"
tracing = "0.1.40"
Expand Down
4 changes: 2 additions & 2 deletions rc-zip-tokio/src/read_zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
task::{Context, Poll},
};

use futures::future::BoxFuture;
use futures_util::future::BoxFuture;
use positioned_io::{RandomAccessFile, ReadAt, Size};
use tokio::io::{AsyncRead, AsyncReadExt, ReadBuf};

Expand Down Expand Up @@ -344,7 +344,7 @@ impl AsyncRead for AsyncRandomAccessFileCursor {
self.poll_read(cx, buf)
}
ARAFCState::Reading { fut } => {
let core = futures::ready!(fut
let core = futures_util::ready!(fut
.as_mut()
.poll(cx)
.map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))??);
Expand Down
2 changes: 1 addition & 1 deletion rc-zip-tokio/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ where
buf: &mut ReadBuf<'_>,
) -> task::Poll<std::io::Result<()>> {
let mut inner_buf = buf.take(1);
futures::ready!(
futures_util::ready!(
unsafe { self.map_unchecked_mut(|s| &mut s.0) }.poll_read(cx, &mut inner_buf)
)?;
let n = inner_buf.filled().len();
Expand Down

0 comments on commit 1ff81a4

Please sign in to comment.