chore: run cargofmt

This commit is contained in:
Byson94
2025-10-13 20:25:59 +05:30
parent 3ef6861b62
commit db5e2055e1
3 changed files with 8 additions and 9 deletions

View File

@@ -843,7 +843,7 @@ impl<B: DisplayBackend> App<B> {
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<B: DisplayBackend> App<B> {
}
});
Ok(())
}
}

View File

@@ -67,7 +67,10 @@ pub trait EwwiiAPI: Send + Sync {
/// }
/// ```
#[cfg(feature = "include-rhai")]
fn rhai_engine_action(&self, f: Box<dyn FnOnce(&mut rhai::Engine) + Send>) -> Result<(), String>;
fn rhai_engine_action(
&self,
f: Box<dyn FnOnce(&mut rhai::Engine) + Send>,
) -> Result<(), String>;
// == Widget Rendering & Logic == //
/// Get the list of all widget id's

View File

@@ -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<RwLock<HashMap<String, String>>>;
pub static SHUTDOWN_REGISTRY: Lazy<Mutex<Vec<watch::Sender<bool>>>> =
@@ -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") };