diff --git a/crates/ewwii/src/app.rs b/crates/ewwii/src/app.rs index 1b5fb81..a0e112d 100644 --- a/crates/ewwii/src/app.rs +++ b/crates/ewwii/src/app.rs @@ -843,7 +843,7 @@ impl App { let cp = self.config_parser.clone(); let wgs = self.widget_reg_store.clone(); - + glib::MainContext::default().spawn_local(async move { let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { while let Ok(req) = rx.recv() { @@ -884,7 +884,6 @@ impl App { } }); - Ok(()) } } diff --git a/crates/ewwii_plugin_api/src/lib.rs b/crates/ewwii_plugin_api/src/lib.rs index 419d757..57bcd27 100644 --- a/crates/ewwii_plugin_api/src/lib.rs +++ b/crates/ewwii_plugin_api/src/lib.rs @@ -67,7 +67,10 @@ pub trait EwwiiAPI: Send + Sync { /// } /// ``` #[cfg(feature = "include-rhai")] - fn rhai_engine_action(&self, f: Box) -> Result<(), String>; + fn rhai_engine_action( + &self, + f: Box, + ) -> Result<(), String>; // == Widget Rendering & Logic == // /// Get the list of all widget id's diff --git a/crates/rhai_impl/src/updates/mod.rs b/crates/rhai_impl/src/updates/mod.rs index cb4d889..01a6791 100644 --- a/crates/rhai_impl/src/updates/mod.rs +++ b/crates/rhai_impl/src/updates/mod.rs @@ -21,11 +21,11 @@ use crate::ast::WidgetNode; use listen::handle_listen; use once_cell::sync::Lazy; use poll::handle_poll; +use std::process::Command; use std::sync::Mutex; use std::{collections::HashMap, sync::Arc, sync::RwLock}; use tokio::sync::mpsc::UnboundedSender; use tokio::sync::watch; -use std::process::Command; pub type ReactiveVarStore = Arc>>; pub static SHUTDOWN_REGISTRY: Lazy>>> = @@ -37,11 +37,8 @@ pub fn handle_state_changes( store: ReactiveVarStore, ) { // Check Dash and prefer if dash is installed. - let dash_installed: bool = Command::new("which") - .arg("dash") - .output() - .map(|o| o.status.success()) - .unwrap_or(false); + let dash_installed: bool = + Command::new("which").arg("dash").output().map(|o| o.status.success()).unwrap_or(false); let shell = if dash_installed { String::from("/bin/dash") } else { String::from("/bin/sh") };