fix: don't unwrap Option<Task>
This commit is contained in:
1 parent
c29cef4ea3
commit
9bf4d97838
1 file changed
+1
-1
@@ -194,7 +194,7 @@ pub fn spawn_forever(fut: impl Future<Output = ()> + 'static) -> Task {
|
||||
///
|
||||
/// This drops the task immediately.
|
||||
pub fn remove_future(id: Task) {
|
||||
Runtime::with(|rt| rt.remove_task(id)).expect("Runtime to exist");
|
||||
Runtime::with(|rt| rt.remove_task(id));
|
||||
}
|
||||
|
||||
/// Store a value between renders. The foundational hook for all other hooks.
|
||||
|
||||
Reference in new issue
Block a user