Skip to content

Commit 16e4ece

Browse files
committed
Make util::async_poll public
We have several interfaces that rely on types from `async_poll`, so it clearly needs to be public.
1 parent b81fedc commit 16e4ece

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lightning/src/util/async_poll.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,25 +92,29 @@ pub(crate) fn dummy_waker() -> Waker {
9292
unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &DUMMY_WAKER_VTABLE)) }
9393
}
9494

95-
/// A type alias for a future that returns a result of type T.
9695
#[cfg(feature = "std")]
96+
/// A type alias for a future that returns a result of type T.
9797
pub type AsyncResult<'a, T> = Pin<Box<dyn Future<Output = Result<T, ()>> + 'a + Send>>;
9898
#[cfg(not(feature = "std"))]
99+
/// A type alias for a future that returns a result of type T.
99100
pub type AsyncResult<'a, T> = Pin<Box<dyn Future<Output = Result<T, ()>> + 'a>>;
100101

101-
// Marker trait to optionally implement `Sync` under std.
102+
/// Marker trait to optionally implement `Sync` under std.
102103
#[cfg(feature = "std")]
103104
pub use core::marker::Sync as MaybeSync;
104105

105106
#[cfg(not(feature = "std"))]
107+
/// Marker trait to optionally implement `Sync` under std.
106108
pub trait MaybeSync {}
107109
#[cfg(not(feature = "std"))]
108110
impl<T> MaybeSync for T where T: ?Sized {}
109111

110-
// Marker trait to optionally implement `Send` under std.
112+
/// Marker trait to optionally implement `Send` under std.
111113
#[cfg(feature = "std")]
112114
pub use core::marker::Send as MaybeSend;
115+
113116
#[cfg(not(feature = "std"))]
117+
/// Marker trait to optionally implement `Send` under std.
114118
pub trait MaybeSend {}
115119
#[cfg(not(feature = "std"))]
116120
impl<T> MaybeSend for T where T: ?Sized {}

lightning/src/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub mod mut_global;
2020

2121
pub mod anchor_channel_reserves;
2222

23+
pub mod async_poll;
2324
#[cfg(fuzzing)]
2425
pub mod base32;
2526
#[cfg(not(fuzzing))]
@@ -33,7 +34,6 @@ pub mod ser;
3334
pub mod sweep;
3435
pub mod wakers;
3536

36-
pub(crate) mod async_poll;
3737
pub(crate) mod atomic_counter;
3838
pub(crate) mod byte_utils;
3939
pub mod hash_tables;

0 commit comments

Comments
 (0)