feat: commit code

This commit is contained in:
YuKun Liu committed 2022-10-03 08:47:58 -07:00
1 parent 77393b273e
commit b3dcebcc50
2 files changed
+29 -11

No files matched your search

+3 -7
View File
@@ -4,7 +4,7 @@ use std::{
sync::Mutex,
};
use mlua::{AsChunk, chunk, Lua, Table};
use mlua::{AsChunk, Lua, Table};
use serde::{Deserialize, Serialize};
use serde_json::json;
@@ -136,10 +136,10 @@ impl PluginManager {
}
Err(e) => {
// plugin init failed
log::warn!("Plugin init failed: {e}");
let _ = lua.load(mlua::chunk! {
table.remove(manager, $idx)
}).exec();
log::warn!("Plugin init failed: {e}");
}
}
}
@@ -289,8 +289,4 @@ impl PluginManager {
res
}
pub fn plugin_status() {
let lua = LUA.lock().unwrap();
}
}
}