Skip to content

Commit 89d0cda

Browse files
nemosupremocarllerche
authored andcommitted
async-await: use new PinMut/PinBox location (#613)
The types moved in `std`. This patch updates tokio-async-await to import `PinMut` and `PinBox` from the new location. Ref: rust-lang/rust#53227
1 parent 8052a9b commit 89d0cda

File tree

9 files changed

+13
-9
lines changed

9 files changed

+13
-9
lines changed

tokio-async-await/src/async_await/compat/backward.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use futures::{
44
};
55
use futures_core::{Future as Future03};
66

7-
use std::boxed::PinBox;
7+
use std::pin::PinBox;
88
use std::future::FutureObj;
99
use std::ptr::NonNull;
1010
use std::task::{

tokio-async-await/src/async_await/compat/forward.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use futures_core::future::Future as Future03;
44
use futures_core::task::Poll as Poll03;
55

66
use std::marker::Unpin;
7-
use std::mem::PinMut;
7+
use std::pin::PinMut;
88
use std::task::Context;
99

1010
/// Converts an 0.1 `Future` into an 0.3 `Future`.

tokio-async-await/src/async_await/io/flush.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use futures_core::task::{self, Poll};
55

66
use std::io;
77
use std::marker::Unpin;
8-
use std::mem::PinMut;
8+
use std::pin::PinMut;
99

1010
/// A future used to fully flush an I/O object.
1111
#[derive(Debug)]

tokio-async-await/src/async_await/io/read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use futures_core::task::{self, Poll};
55

66
use std::io;
77
use std::marker::Unpin;
8-
use std::mem::PinMut;
8+
use std::pin::PinMut;
99

1010
/// A future which can be used to read bytes.
1111
#[derive(Debug)]

tokio-async-await/src/async_await/io/read_exact.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ use futures_util::try_ready;
66

77
use std::io;
88
use std::marker::Unpin;
9-
use std::mem::{self, PinMut};
9+
use std::mem;
10+
11+
use core::pin::PinMut;
1012

1113
/// A future which can be used to read exactly enough bytes to fill a buffer.
1214
#[derive(Debug)]

tokio-async-await/src/async_await/io/write.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use futures_core::task::{self, Poll};
55

66
use std::io;
77
use std::marker::Unpin;
8-
use std::mem::PinMut;
8+
use std::pin::PinMut;
99

1010
/// A future used to write data.
1111
#[derive(Debug)]

tokio-async-await/src/async_await/io/write_all.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ use futures_util::try_ready;
66

77
use std::io;
88
use std::marker::Unpin;
9-
use std::mem::{self, PinMut};
9+
use std::mem;
10+
11+
use core::pin::PinMut;
1012

1113
/// A future used to write the entire contents of a buffer.
1214
#[derive(Debug)]

tokio-async-await/src/async_await/sink/send.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use futures_core::future::Future;
44
use futures_core::task::{self, Poll};
55

66
use std::marker::Unpin;
7-
use std::mem::PinMut;
7+
use std::pin::PinMut;
88

99
/// Future for the `SinkExt::send_async` combinator, which sends a value to a
1010
/// sink and then waits until the sink has fully flushed.

tokio-async-await/src/async_await/stream/next.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use futures_core::future::Future;
33
use futures_core::task::{self, Poll};
44

55
use std::marker::Unpin;
6-
use std::mem::PinMut;
6+
use std::pin::PinMut;
77

88
/// A future of the next element of a stream.
99
#[derive(Debug)]

0 commit comments

Comments
 (0)