mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
chore: update pin-project to 0.4.0-beta.1 (#1586)
This commit is contained in:
+2
-2
@@ -20,7 +20,7 @@ Core I/O primitives for asynchronous I/O in Rust.
|
||||
categories = ["asynchronous"]
|
||||
|
||||
[features]
|
||||
util = ["memchr", "pin-utils"]
|
||||
util = ["memchr", "pin-utils", "pin-project"]
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4.7"
|
||||
@@ -28,7 +28,7 @@ log = "0.4"
|
||||
futures-core-preview = "=0.3.0-alpha.18"
|
||||
memchr = { version = "2.2", optional = true }
|
||||
pin-utils = { version = "=0.1.0-alpha.4", optional = true }
|
||||
pin-project = "=0.4.0-alpha.11"
|
||||
pin-project = { version = "=0.4.0-beta.1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "=0.2.0-alpha.5", path = "../tokio" }
|
||||
|
||||
@@ -29,25 +29,25 @@ impl<RW: AsyncRead + AsyncWrite> BufStream<RW> {
|
||||
|
||||
impl<RW: AsyncRead + AsyncWrite> AsyncWrite for BufStream<RW> {
|
||||
fn poll_write(
|
||||
mut self: Pin<&mut Self>,
|
||||
self: Pin<&mut Self>,
|
||||
cx: &mut Context<'_>,
|
||||
buf: &[u8],
|
||||
) -> Poll<io::Result<usize>> {
|
||||
self.project().0.poll_write(cx, buf)
|
||||
}
|
||||
|
||||
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||
self.project().0.poll_flush(cx)
|
||||
}
|
||||
|
||||
fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||
self.project().0.poll_shutdown(cx)
|
||||
}
|
||||
}
|
||||
|
||||
impl<RW: AsyncRead + AsyncWrite> AsyncRead for BufStream<RW> {
|
||||
fn poll_read(
|
||||
mut self: Pin<&mut Self>,
|
||||
self: Pin<&mut Self>,
|
||||
cx: &mut Context<'_>,
|
||||
buf: &mut [u8],
|
||||
) -> Poll<io::Result<usize>> {
|
||||
@@ -62,10 +62,10 @@ impl<RW: AsyncRead + AsyncWrite> AsyncRead for BufStream<RW> {
|
||||
|
||||
impl<RW: AsyncBufRead + AsyncRead + AsyncWrite> AsyncBufRead for BufStream<RW> {
|
||||
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
|
||||
self.project_into().0.poll_fill_buf(cx)
|
||||
self.project().0.poll_fill_buf(cx)
|
||||
}
|
||||
|
||||
fn consume(mut self: Pin<&mut Self>, amt: usize) {
|
||||
fn consume(self: Pin<&mut Self>, amt: usize) {
|
||||
self.project().0.consume(amt)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user