mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-23 08:57:14 +03:00
fix(cleanup): simplify loop (#1077)
This commit is contained in:
parent
58ca188015
commit
346e093414
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user