Implemented engine return

This commit is contained in:
2026-01-30 14:19:24 +01:00
parent ccbbf29538
commit 2d79b1dfbb
7 changed files with 37 additions and 30 deletions
+6 -1
View File
@@ -102,13 +102,18 @@ impl Engine for Console {
self.executor.clone()
}
fn run<F: Fn(&Arc<Context>) -> View + Send + Sync + 'static>(&self, component: F) {
fn run<F: Fn(&Arc<Context>) -> View + Send + Sync + 'static>(
&self,
component: F,
) -> crate::Result<()> {
let cx = self.init(component);
while self.executor.is_running() {
self.render(&cx);
self.render_delay();
}
Ok(())
}
}