Revert "refactor(lib): Switch from pin-project to pin-project-lite"

This reverts commit 43412a950f.
This commit is contained in:
Sean McArthur
2021-02-05 15:37:21 -08:00
parent 48d4594930
commit 7390f026d7
14 changed files with 262 additions and 343 deletions

View File

@@ -11,7 +11,7 @@ use futures_channel::oneshot;
use tokio::time::{Duration, Instant, Interval};
use super::client::Ver;
use crate::common::{exec::Exec, task, Future, Pin, Poll, Unpin};
use crate::common::{task, exec::Exec, Future, Pin, Poll, Unpin};
// FIXME: allow() required due to `impl Trait` leaking types to this lint
#[allow(missing_debug_implementations)]
@@ -714,17 +714,16 @@ impl Expiration {
}
#[cfg(feature = "runtime")]
pin_project_lite::pin_project! {
struct IdleTask<T> {
#[pin]
interval: Interval,
pool: WeakOpt<Mutex<PoolInner<T>>>,
// This allows the IdleTask to be notified as soon as the entire
// Pool is fully dropped, and shutdown. This channel is never sent on,
// but Err(Canceled) will be received when the Pool is dropped.
#[pin]
pool_drop_notifier: oneshot::Receiver<crate::common::Never>,
}
#[pin_project::pin_project]
struct IdleTask<T> {
#[pin]
interval: Interval,
pool: WeakOpt<Mutex<PoolInner<T>>>,
// This allows the IdleTask to be notified as soon as the entire
// Pool is fully dropped, and shutdown. This channel is never sent on,
// but Err(Canceled) will be received when the Pool is dropped.
#[pin]
pool_drop_notifier: oneshot::Receiver<crate::common::Never>,
}
#[cfg(feature = "runtime")]
@@ -777,7 +776,7 @@ mod tests {
use std::time::Duration;
use super::{Connecting, Key, Pool, Poolable, Reservation, WeakOpt};
use crate::common::{exec::Exec, task, Future, Pin};
use crate::common::{task, exec::Exec, Future, Pin};
/// Test unique reservations.
#[derive(Debug, PartialEq, Eq)]