Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(common): replace Never with Infallible #39

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;