Skip to content

Commit b849c1d

Browse files
committed
f Also cfg_attr-out stop_sender
1 parent 5cd01ce commit b849c1d

File tree

1 file changed

+8
-5
lines changed
  • lightning-background-processor/src

1 file changed

+8
-5
lines changed

lightning-background-processor/src/lib.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -700,14 +700,17 @@ 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(
704+
feature = "std",
705+
doc = " let (stop_sender, stop_receiver) = tokio::sync::watch::channel(());"
706+
)]
707+
#[cfg_attr(feature = "std", doc = "")]
705708
/// let sleeper = move |d| {
706-
/// let mut receiver = stop_receiver.clone();
709+
#[cfg_attr(feature = "std", doc = " let mut receiver = stop_receiver.clone();")]
707710
/// Box::pin(async move {
708711
/// tokio::select!{
709712
/// _ = tokio::time::sleep(d) => false,
710-
/// _ = receiver.changed() => true,
713+
#[cfg_attr(feature = "std", doc = " _ = receiver.changed() => true,")]
711714
/// }
712715
/// })
713716
/// };
@@ -740,7 +743,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
740743
/// });
741744
///
742745
/// // Stop the background processing.
743-
/// stop_sender.send(()).unwrap();
746+
#[cfg_attr(feature = "std", doc = " stop_sender.send(()).unwrap();")]
744747
#[cfg_attr(feature = "std", doc = " handle.await.unwrap()")]
745748
/// # }
746749
///```

0 commit comments

Comments
 (0)