Skip to content

Commit d35ff15

Browse files
committed
change CopyBothDuplex::finish: take self by value
1 parent f744467 commit d35ff15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tokio-postgres/src/copy_both.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ where
151151
///
152152
/// The `Sink::close` method is equivalent to `finish`, except that it does not return the
153153
/// number of rows.
154-
pub async fn finish(mut self: Pin<&mut Self>) -> Result<u64, Error> {
154+
pub async fn finish(mut self) -> Result<u64, Error> {
155+
let pinned = Pin::new(&mut self);
155156
future::poll_fn(|cx| self.as_mut().poll_finish(cx)).await
156157
}
157158

0 commit comments

Comments
 (0)