From cb7651e7a2dd81ffaa83de3f113f7ee4f5bc9c94 Mon Sep 17 00:00:00 2001 From: segfaultdoctor <17258903+segfaultdoc@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:39:05 -0500 Subject: [PATCH] wip --- runtime-plugin/src/runtime_plugin_manager.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/runtime-plugin/src/runtime_plugin_manager.rs b/runtime-plugin/src/runtime_plugin_manager.rs index f14ba90f61..af1dcf2cde 100644 --- a/runtime-plugin/src/runtime_plugin_manager.rs +++ b/runtime-plugin/src/runtime_plugin_manager.rs @@ -125,13 +125,11 @@ impl RuntimePluginManager { pub(crate) fn unload_plugin(&mut self, name: &str) -> JsonRpcResult<()> { // Check if any plugin names match this one - let idx = if let Some(idx) = self + let Some(idx) = self .plugins .iter() .position(|plugin| plugin.name().eq(name)) - { - idx - } else { + else { // If we don't find one return an error return Err(jsonrpc_core::error::Error { code: ErrorCode::InvalidRequest, @@ -149,13 +147,11 @@ impl RuntimePluginManager { /// Reloads an existing plugin. pub(crate) fn reload_plugin(&mut self, name: &str, config_file: &str) -> JsonRpcResult<()> { // Check if any plugin names match this one - let idx = if let Some(idx) = self + let Some(idx) = self .plugins .iter() .position(|plugin| plugin.name().eq(name)) - { - idx - } else { + else { // If we don't find one return an error return Err(jsonrpc_core::error::Error { code: ErrorCode::InvalidRequest,