浏览代码

Merge pull request #1023 from DogeDark/fix-doc

Jon Kelley 2 年之前
父节点
当前提交
5d4650f04b
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      packages/hooks/src/usecoroutine.rs

+ 4 - 0
packages/hooks/src/usecoroutine.rs

@@ -34,6 +34,10 @@ use std::future::Future;
 /// don't care about actions in your app being synchronized, you can use [`use_callback`]
 /// hook to spawn multiple tasks and run them concurrently.
 ///
+/// ### Notice
+/// In order to use ``rx.next().await``, you will need to extend the ``Stream`` trait (used by ``UnboundedReceiver``)
+/// by adding the ``futures-util`` crate as a dependency and adding ``StreamExt`` into scope via ``use futures_util::stream::StreamExt;``
+///
 /// ## Example
 ///
 /// ```rust, ignore