Skip to content

Commit bbde9ae

Browse files
authored
Merge pull request #277 from espindola/pin
Drop unnecessary use of Pin
2 parents 8cda939 + 3de12e3 commit bbde9ae

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/conn/pool/futures/get_conn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl Future for GetConn {
113113
match self.inner {
114114
GetConnInner::New => {
115115
let queue_id = self.queue_id;
116-
let next = ready!(Pin::new(self.pool_mut()).poll_new_conn(cx, queue_id))?;
116+
let next = ready!(self.pool_mut().poll_new_conn(cx, queue_id))?;
117117
match next {
118118
GetConnInner::Connecting(conn_fut) => {
119119
self.inner = GetConnInner::Connecting(conn_fut);

src/conn/pool/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use std::{
1616
collections::VecDeque,
1717
convert::TryFrom,
1818
hash::{Hash, Hasher},
19-
pin::Pin,
2019
str::FromStr,
2120
sync::{atomic, Arc, Mutex},
2221
task::{Context, Poll, Waker},
@@ -286,7 +285,7 @@ impl Pool {
286285

287286
/// Poll the pool for an available connection.
288287
fn poll_new_conn(
289-
self: Pin<&mut Self>,
288+
&mut self,
290289
cx: &mut Context<'_>,
291290
queue_id: QueueId,
292291
) -> Poll<Result<GetConnInner>> {

0 commit comments

Comments
 (0)