add must use to several hooks

This commit is contained in:
Evan Almloff committed 2023-10-14 12:08:54 -05:00
1 parent 04f83e1e92
commit 3bf6d2d7cf
21 files changed
+25

No files matched your search

+1
View File
@@ -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()