Skip to content

Commit bbf633a

Browse files
Feature-gate new function
1 parent 07457b4 commit bbf633a

File tree

1 file changed

+2
-0
lines changed
  • futures-channel/src/mpsc

1 file changed

+2
-0
lines changed

futures-channel/src/mpsc/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ impl<T> BoundedSenderInner<T> {
624624
///
625625
/// - `Poll::Ready(()` if there are no messages in the channel;
626626
/// - `Poll::Pending` if there are messages in the channel.
627+
#[cfg(feature = "sink")]
627628
fn poll_is_empty(&mut self, cx: &mut Context<'_>) -> Poll<()> {
628629
let state = decode_state(self.inner.state.load(SeqCst));
629630
if state.num_messages == 0 {
@@ -783,6 +784,7 @@ impl<T> Sender<T> {
783784
///
784785
/// - `Poll::Ready(()` if there are no messages in the channel or the [`Receiver`] is disconnected.
785786
/// - `Poll::Pending` if there are messages in the channel.
787+
#[cfg(feature = "sink")]
786788
pub(crate) fn poll_is_empty(&mut self, cx: &mut Context<'_>) -> Poll<()> {
787789
let inner = match self.0.as_mut() {
788790
None => return Poll::Ready(()),

0 commit comments

Comments
 (0)