and mut bound to mut methods on signals
This commit is contained in:
31 files changed
+129
-153
No files matched your search
@@ -125,7 +125,7 @@ impl<T> Coroutine<T> {
|
||||
/// Restart this coroutine
|
||||
///
|
||||
/// Forces the component to re-render, which will re-invoke the coroutine.
|
||||
pub fn restart(&self) {
|
||||
pub fn restart(&mut self) {
|
||||
self.needs_regen.set(true);
|
||||
self.task().stop();
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ where
|
||||
T: 'static,
|
||||
F: Future<Output = T> + 'static,
|
||||
{
|
||||
let value = use_signal(|| None);
|
||||
let state = use_signal(|| UseFutureState::Pending);
|
||||
let mut value = use_signal(|| None);
|
||||
let mut state = use_signal(|| UseFutureState::Pending);
|
||||
|
||||
let task = use_signal(|| {
|
||||
// Create the user's task
|
||||
@@ -84,7 +84,7 @@ impl<T> UseFuture<T> {
|
||||
}
|
||||
|
||||
// Manually set the value in the future slot without starting the future over
|
||||
pub fn set(&self, new_value: T) {
|
||||
pub fn set(&mut self, new_value: T) {
|
||||
self.value.set(Some(new_value));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user