chore: run cargo fmt

This commit is contained in:
Byson94
2025-11-22 11:13:24 +05:30
parent 8406c86117
commit 0d803fd962
2 changed files with 8 additions and 5 deletions

View File

@@ -787,9 +787,10 @@ impl<B: DisplayBackend> App<B> {
if let Ok(mut maybe_registry) = self.widget_reg_store.lock() {
if let Some(widget_registry) = maybe_registry.as_mut() {
let pid = widget_registry
.get_widget_id_by_name(&parent_name)
.ok_or_else(|| anyhow::anyhow!("Widget '{}' not found", parent_name))?;
let pid =
widget_registry.get_widget_id_by_name(&parent_name).ok_or_else(
|| anyhow::anyhow!("Widget '{}' not found", parent_name),
)?;
widget_registry.create_widget(&widget_node, wid, pid)?;
} else {
log::error!("Widget registry is empty");

View File

@@ -79,7 +79,7 @@ pub trait EwwiiAPI: Send + Sync {
/// **NOTE:***
///
/// Due to TypeID mismatches, methods like `register_type`, `register_fn`,
/// etc. won't work on the engine and may cause a crash. It is recommended
/// etc. won't work on the engine and may cause a crash. It is recommended
/// to use the `register_function` API to register a funtion which `api::slib`
/// can call to in rhai.
///
@@ -107,7 +107,9 @@ pub trait EwwiiAPI: Send + Sync {
fn register_function(
&self,
name: String,
f: Box<dyn Fn(rhai::Array) -> Result<rhai::Dynamic, Box<rhai::EvalAltResult>> + Send + Sync>,
f: Box<
dyn Fn(rhai::Array) -> Result<rhai::Dynamic, Box<rhai::EvalAltResult>> + Send + Sync,
>,
) -> Result<(), String>;
// == Widget Rendering & Logic == //