summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/src/program/state.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/src/program/state.rs b/runtime/src/program/state.rs
index f57d2d8d..9ae504ee 100644
--- a/runtime/src/program/state.rs
+++ b/runtime/src/program/state.rs
@@ -176,10 +176,10 @@ where
}
/// Applies [`widget::Operation`]s to the [`State`]
- pub fn operate<'a>(
+ pub fn operate(
&mut self,
renderer: &mut P::Renderer,
- operations: impl Iterator<Item = &'a mut dyn Operation<P::Message>>,
+ operations: impl Iterator<Item = Box<dyn Operation<P::Message>>>,
bounds: Size,
debug: &mut Debug,
) {
@@ -192,18 +192,18 @@ where
);
for operation in operations {
- let mut owned_op;
let mut current_operation = Some(operation);
- while let Some(operation) = current_operation.take() {
- user_interface.operate(renderer, operation);
+
+ while let Some(mut operation) = current_operation.take() {
+ user_interface.operate(renderer, operation.as_mut());
+
match operation.finish() {
Outcome::None => {}
Outcome::Some(message) => {
self.queued_messages.push(message)
}
- Outcome::Chain(op) => {
- owned_op = op;
- current_operation = Some(owned_op.as_mut());
+ Outcome::Chain(next) => {
+ current_operation = Some(next);
}
};
}