Skip to content

Commit 770e83e

Browse files
authored
Merge pull request #177 from Open-VCS/Remove-unused-variables
Remove unused variables
2 parents 40d04ba + 19f68ec commit 770e83e

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

Backend/src/plugin_runtime/events.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub fn emit_from_plugin(plugin_id: &str, name: &str, payload: Value) {
6666
pub fn emit_to_plugins(origin_plugin_id: Option<&str>, name: &str, payload: Value) {
6767
let _ = payload;
6868
if let Ok(lock) = registry().lock() {
69-
let _targets: Vec<String> = lock
69+
let _ = lock
7070
.subs
7171
.iter()
7272
.filter_map(|(plugin_id, events)| {
@@ -78,6 +78,6 @@ pub fn emit_to_plugins(origin_plugin_id: Option<&str>, name: &str, payload: Valu
7878
}
7979
Some(plugin_id.clone())
8080
})
81-
.collect();
81+
.collect::<Vec<_>>();
8282
}
8383
}

Backend/src/plugin_runtime/manager.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ impl PluginRuntimeManager {
480480
}
481481

482482
trace!("start_plugin_spec: creating new instance");
483-
let instance = self.create_instance(&spec)?;
483+
let instance = Self::create_instance(&spec)?;
484484
debug!("start_plugin_spec: instance created, ensuring running");
485485
instance.ensure_running()?;
486486

@@ -521,10 +521,7 @@ impl PluginRuntimeManager {
521521
}
522522

523523
/// Creates a runtime instance for a resolved plugin spec.
524-
fn create_instance(
525-
&self,
526-
spec: &ModuleRuntimeSpec,
527-
) -> Result<Arc<dyn PluginRuntimeInstance>, String> {
524+
fn create_instance(spec: &ModuleRuntimeSpec) -> Result<Arc<dyn PluginRuntimeInstance>, String> {
528525
create_runtime_instance(spec.spawn.clone())
529526
}
530527

Backend/src/plugin_runtime/node_instance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl NodePluginRuntimeInstance {
206206
/// # Returns
207207
/// - `Ok(String)` with absolute path to bundled node runtime.
208208
/// - `Err(String)` when bundled runtime path is unavailable.
209-
fn node_executable(&self) -> Result<String, String> {
209+
fn node_executable() -> Result<String, String> {
210210
let Some(path) = plugin_paths::node_executable_path() else {
211211
return Err(
212212
"bundled node runtime is unavailable; plugin execution requires app-bundled node"
@@ -222,7 +222,7 @@ impl NodePluginRuntimeInstance {
222222
/// - `Ok(NodeRpcProcess)` when startup succeeds.
223223
/// - `Err(String)` when process startup or init RPC fails.
224224
fn spawn_process(&self) -> Result<NodeRpcProcess, String> {
225-
let node_exec = self.node_executable()?;
225+
let node_exec = Self::node_executable()?;
226226
info!(
227227
"plugin runtime: starting node plugin '{}' via '{}'",
228228
self.spawn.plugin_id, node_exec

0 commit comments

Comments
 (0)