diff options
| author | Ken Matsui <26405363+ken-matsui@users.noreply.github.com> | 2022-02-24 16:08:23 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-24 08:08:23 +0100 |
| commit | 346e09341413ba8d1a77b83fcaba9a1cd9ae2612 (patch) | |
| tree | 1b6b4b10e7e0dc2bc0fe12342432059a40b913d2 | |
| parent | docs(changelog): add `^b` action to `tmux-mode` (diff) | |
| download | sl0ppij-346e09341413ba8d1a77b83fcaba9a1cd9ae2612.tar.gz sl0ppij-346e09341413ba8d1a77b83fcaba9a1cd9ae2612.tar.xz sl0ppij-346e09341413ba8d1a77b83fcaba9a1cd9ae2612.zip | |
fix(cleanup): simplify loop (#1077)
| -rw-r--r-- | zellij-server/src/wasm_vm.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/zellij-server/src/wasm_vm.rs b/zellij-server/src/wasm_vm.rs index 53bc4f6f..6defb32f 100644 --- a/zellij-server/src/wasm_vm.rs +++ b/zellij-server/src/wasm_vm.rs @@ -183,13 +183,12 @@ pub(crate) fn wasm_thread_main( for (&(plugin_id, _), (instance, plugin_env)) in &plugin_map { if seen.contains(&plugin_id) { continue; - } else { - seen.insert(plugin_id); - let mut new_plugin_env = plugin_env.clone(); - - new_plugin_env.client_id = client_id; - new_plugins.insert(plugin_id, (instance.module().clone(), new_plugin_env)); } + seen.insert(plugin_id); + let mut new_plugin_env = plugin_env.clone(); + + new_plugin_env.client_id = client_id; + new_plugins.insert(plugin_id, (instance.module().clone(), new_plugin_env)); } for (plugin_id, (module, mut new_plugin_env)) in new_plugins.drain() { let wasi = new_plugin_env.wasi_env.import_object(&module).unwrap(); |
