Skip to content

Commit d6ea7a7

Browse files
committed
Add T: Unpin bound to ReadHalf::unsplit
1 parent 9241c3e commit d6ea7a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tokio/src/io/split.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ impl<T> ReadHalf<T> {
7474
/// same `split` operation this method will panic.
7575
/// This can be checked ahead of time by comparing the stream ID
7676
/// of the two halves.
77-
pub fn unsplit(self, wr: WriteHalf<T>) -> T {
77+
pub fn unsplit(self, wr: WriteHalf<T>) -> T
78+
where
79+
T: Unpin,
80+
{
7881
if self.is_pair_of(&wr) {
7982
drop(wr);
8083

0 commit comments

Comments
 (0)