Skip to content

Commit

Permalink
refactor(common): replace Never with Infallible (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Oct 4, 2023
1 parent d97181a commit 63e84bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/client/pool.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![allow(dead_code)]

use std::collections::{HashMap, HashSet, VecDeque};
use std::convert::Infallible;
use std::error::Error as StdError;
use std::fmt::{self, Debug};
use std::future::Future;
Expand Down Expand Up @@ -97,7 +98,7 @@ struct PoolInner<T, K: Eq + Hash> {
// A oneshot channel is used to allow the interval to be notified when
// the Pool completely drops. That way, the interval can cancel immediately.
#[cfg(feature = "runtime")]
idle_interval_ref: Option<oneshot::Sender<crate::common::Never>>,
idle_interval_ref: Option<oneshot::Sender<Infallible>>,
#[cfg(feature = "runtime")]
exec: Exec,
timeout: Option<Duration>,
Expand Down Expand Up @@ -771,7 +772,7 @@ pin_project_lite::pin_project! {
// 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>,
pool_drop_notifier: oneshot::Receiver<Infallible>,
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub(crate) use ready;
pub mod exec;
#[cfg(feature = "client")]
mod lazy;
pub(crate) mod never;
pub(crate) mod rewind;
#[cfg(feature = "client")]
mod sync;
Expand All @@ -23,7 +22,5 @@ pub(crate) use exec::Exec;

#[cfg(feature = "client")]
pub(crate) use lazy::{lazy, Started as Lazy};
#[cfg(feature = "runtime")]
pub(crate) use never::Never;
#[cfg(feature = "client")]
pub(crate) use sync::SyncWrapper;

0 comments on commit 63e84bf

Please sign in to comment.