Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Backend/src/plugin_runtime/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub fn emit_from_plugin(plugin_id: &str, name: &str, payload: Value) {
pub fn emit_to_plugins(origin_plugin_id: Option<&str>, name: &str, payload: Value) {
let _ = payload;
if let Ok(lock) = registry().lock() {
let _targets: Vec<String> = lock
let _ = lock
.subs
.iter()
.filter_map(|(plugin_id, events)| {
Expand All @@ -78,6 +78,6 @@ pub fn emit_to_plugins(origin_plugin_id: Option<&str>, name: &str, payload: Valu
}
Some(plugin_id.clone())
})
.collect();
.collect::<Vec<_>>();
}
}
7 changes: 2 additions & 5 deletions Backend/src/plugin_runtime/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl PluginRuntimeManager {
}

trace!("start_plugin_spec: creating new instance");
let instance = self.create_instance(&spec)?;
let instance = Self::create_instance(&spec)?;
debug!("start_plugin_spec: instance created, ensuring running");
instance.ensure_running()?;

Expand Down Expand Up @@ -521,10 +521,7 @@ impl PluginRuntimeManager {
}

/// Creates a runtime instance for a resolved plugin spec.
fn create_instance(
&self,
spec: &ModuleRuntimeSpec,
) -> Result<Arc<dyn PluginRuntimeInstance>, String> {
fn create_instance(spec: &ModuleRuntimeSpec) -> Result<Arc<dyn PluginRuntimeInstance>, String> {
create_runtime_instance(spec.spawn.clone())
}

Expand Down
4 changes: 2 additions & 2 deletions Backend/src/plugin_runtime/node_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl NodePluginRuntimeInstance {
/// # Returns
/// - `Ok(String)` with absolute path to bundled node runtime.
/// - `Err(String)` when bundled runtime path is unavailable.
fn node_executable(&self) -> Result<String, String> {
fn node_executable() -> Result<String, String> {
let Some(path) = plugin_paths::node_executable_path() else {
return Err(
"bundled node runtime is unavailable; plugin execution requires app-bundled node"
Expand All @@ -222,7 +222,7 @@ impl NodePluginRuntimeInstance {
/// - `Ok(NodeRpcProcess)` when startup succeeds.
/// - `Err(String)` when process startup or init RPC fails.
fn spawn_process(&self) -> Result<NodeRpcProcess, String> {
let node_exec = self.node_executable()?;
let node_exec = Self::node_executable()?;
info!(
"plugin runtime: starting node plugin '{}' via '{}'",
self.spawn.plugin_id, node_exec
Expand Down
Loading