mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-29 09:41:34 +00:00
*: Remove usage of custom buffer initialization usage (#1263)
* *: Remove usage of custom buffer initialization usage With version `0.3.0-alpha.19` the futures-preview crate makes the `AsyncRead::initializer` API unstable. In order to improve interoperability with e.g. both a library depending on alpha.18 as well as a library depending on alpha.19 and in order for rust-libp2p to become stable again, this commit removes all usages of the unstable `initializer` API. * protocols/noise: Remove NoiseOutput Asyncread initializer * transports/tcp: Remove TcpTransStream AsyncRead initializer * *: Remove version pinning of futures-preview to 0.3.0-alpha.18 With version 0.3.0-alpha.19 the futures-preview crate makes the AsyncRead::initializer API unstable. Given that the previous commits removed usage of the initializer API, the version pinning is not needed any longer.
This commit is contained in:
committed by
Toralf Wittner
parent
0eeddac86f
commit
8944899fe0
@ -135,7 +135,6 @@ impl<S> AsyncRead for DeflateOutput<S>
|
||||
unsafe {
|
||||
this.read_interm.reserve(256);
|
||||
this.read_interm.set_len(this.read_interm.capacity());
|
||||
this.inner.initializer().initialize(&mut this.read_interm);
|
||||
}
|
||||
|
||||
match AsyncRead::poll_read(Pin::new(&mut this.inner), cx, &mut this.read_interm) {
|
||||
@ -172,10 +171,6 @@ impl<S> AsyncRead for DeflateOutput<S>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn initializer(&self) -> futures::io::Initializer {
|
||||
futures::io::Initializer::nop()
|
||||
}
|
||||
}
|
||||
|
||||
impl<S> AsyncWrite for DeflateOutput<S>
|
||||
|
Reference in New Issue
Block a user