Skip to content

Commit e88c6d5

Browse files
bors[bot]Nemo157
andauthored
Merge #53
53: Update for futures 0.3 r=Nemo157 a=Nemo157 Co-authored-by: Wim Looman <[email protected]>
2 parents 25022b6 + 959c91a commit e88c6d5

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Cargo.toml

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-compression"
3-
version = "0.1.0-alpha.7"
3+
version = "0.1.0"
44
authors = ["Wim Looman <[email protected]>", "Allen Bui <[email protected]>"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"
@@ -17,8 +17,8 @@ rustdoc-args = ["--cfg", "docsrs"]
1717

1818
[features]
1919
default = ["bufread", "stream", "write", "brotli", "bzip", "deflate", "gzip", "zlib", "zstd"]
20-
bufread = ["futures-io-preview"]
21-
write = ["futures-io-preview"]
20+
bufread = ["futures-io"]
21+
write = ["futures-io"]
2222
stream = ["bytes"]
2323
brotli = ["brotli2"]
2424
bzip = ["bzip2"]
@@ -32,19 +32,18 @@ brotli2 = { version = "0.3.2", optional = true }
3232
bytes = { version = "0.4.12", optional = true }
3333
bzip2 = { version = "0.3.3" , optional = true }
3434
flate2 = { version = "1.0.11", optional = true }
35-
futures-core-preview = { version = "0.3.0-alpha.19", default-features = false }
36-
futures-io-preview = { version = "0.3.0-alpha.19", default-features = false, features = ["std"], optional = true }
35+
futures-core = { version = "0.3.0", default-features = false }
36+
futures-io = { version = "0.3.0", default-features = false, features = ["std"], optional = true }
3737
pin-project = "0.4.3"
3838
libzstd = { version = "0.5.0", optional = true, package = "zstd", default-features = false }
3939
zstd-safe = { version = "2.0.0", optional = true, default-features = false }
4040
memchr = "2.2.1"
4141

4242
[dev-dependencies]
4343
proptest = "0.9.4"
44-
pin-utils = "0.1.0-alpha.4"
4544
proptest-derive = "0.1.2"
4645
rand = "0.7.2"
47-
futures-preview = "0.3.0-alpha.19"
48-
futures-test-preview = "0.3.0-alpha.19"
46+
futures = "0.3.0"
47+
futures-test = "0.3.0"
4948
ntest = "0.3.3"
5049
timebomb = "0.1.2"

tests/utils/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ mod prelude {
6565
pub use futures::{
6666
executor::{block_on, block_on_stream},
6767
io::{
68-
AsyncBufRead, AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt,
69-
BufReader,
68+
copy_buf, AsyncBufRead, AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWrite,
69+
AsyncWriteExt, BufReader, Cursor,
7070
},
71+
pin_mut,
7172
stream::{self, Stream, TryStreamExt},
7273
};
7374
pub use futures_test::{
7475
io::{AsyncReadTestExt, AsyncWriteTestExt},
7576
stream::StreamTestExt,
7677
};
77-
pub use pin_utils::pin_mut;
7878
pub use std::{
79-
io::{self, Cursor, Read},
79+
io::{self, Read},
8080
pin::Pin,
8181
};
8282

@@ -91,7 +91,7 @@ mod prelude {
9191
// All current test cases are < 100kB
9292
let mut output = Cursor::new(vec![0; 102_400]);
9393
pin_mut!(read);
94-
let len = block_on(BufReader::with_capacity(2, read).copy_buf_into(&mut output)).unwrap();
94+
let len = block_on(copy_buf(BufReader::with_capacity(2, read), &mut output)).unwrap();
9595
let mut output = output.into_inner();
9696
output.truncate(len as usize);
9797
output

0 commit comments

Comments
 (0)