Skip to content

Commit 3cdd901

Browse files
committed
f Also cfg_attr-out stop_sender
1 parent 331f2e2 commit 3cdd901

File tree

1 file changed

+4
-4
lines changed
  • lightning-background-processor/src

1 file changed

+4
-4
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,14 +700,14 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
700700
/// let background_scorer = Arc::clone(&node.scorer);
701701
///
702702
/// // Setup the sleeper.
703-
/// let (stop_sender, stop_receiver) = tokio::sync::watch::channel(());
704-
///
703+
#[cfg_attr(feature = "std", doc = " let (stop_sender, stop_receiver) = tokio::sync::watch::channel(());")]
704+
#[cfg_attr(feature = "std", doc = "")]
705705
/// let sleeper = move |d| {
706706
/// let mut receiver = stop_receiver.clone();
707707
/// Box::pin(async move {
708708
/// tokio::select!{
709709
/// _ = tokio::time::sleep(d) => false,
710-
/// _ = receiver.changed() => true,
710+
#[cfg_attr(feature = "std", doc = " _ = receiver.changed() => true,")]
711711
/// }
712712
/// })
713713
/// };
@@ -740,7 +740,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
740740
/// });
741741
///
742742
/// // Stop the background processing.
743-
/// stop_sender.send(()).unwrap();
743+
#[cfg_attr(feature = "std", doc = " stop_sender.send(()).unwrap();")]
744744
#[cfg_attr(feature = "std", doc = " handle.await.unwrap()")]
745745
/// # }
746746
///```

0 commit comments

Comments
 (0)