Skip to content

Commit

Permalink
change CopyBothDuplex::finish: take self by value
Browse files Browse the repository at this point in the history
  • Loading branch information
sharnoff committed Sep 28, 2021
1 parent f744467 commit d35ff15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tokio-postgres/src/copy_both.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ where
///
/// The `Sink::close` method is equivalent to `finish`, except that it does not return the
/// number of rows.
pub async fn finish(mut self: Pin<&mut Self>) -> Result<u64, Error> {
pub async fn finish(mut self) -> Result<u64, Error> {
let pinned = Pin::new(&mut self);
future::poll_fn(|cx| self.as_mut().poll_finish(cx)).await
}

Expand Down

0 comments on commit d35ff15

Please sign in to comment.