Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
segfaultdoc committed Nov 6, 2023
1 parent b79e3dd commit cb7651e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions runtime-plugin/src/runtime_plugin_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit cb7651e

Please sign in to comment.