add must use to several hooks
This commit is contained in:
1 parent
04f83e1e92
commit
3bf6d2d7cf
21 files changed
+25
No files matched your search
@@ -79,6 +79,7 @@ where
|
||||
/// Get a handle to a coroutine higher in the tree
|
||||
///
|
||||
/// See the docs for [`use_coroutine`] for more details.
|
||||
#[must_use]
|
||||
pub fn use_coroutine_handle<M: 'static>(cx: &ScopeState) -> Option<&Coroutine<M>> {
|
||||
cx.use_hook(|| cx.consume_context::<Coroutine<M>>())
|
||||
.as_ref()
|
||||
|
||||
Reference in new issue
Block a user