fix(plugin): mismatch JSON format on get_zellij_version
* chore(wasm): comment on target of error * fix(wasm): formatting the VERSION string * refactor(wasm): simplify code * chore: delete comments resolved * feat(wasm): update write_object fn for generic
This commit is contained in:
parent
c3f838a906
commit
4e5717ec6e
1 changed files with 2 additions and 2 deletions
|
|
@ -313,7 +313,7 @@ fn host_get_plugin_ids(plugin_env: &PluginEnv) {
|
|||
}
|
||||
|
||||
fn host_get_zellij_version(plugin_env: &PluginEnv) {
|
||||
wasi_write_string(&plugin_env.wasi_env, VERSION);
|
||||
wasi_write_object(&plugin_env.wasi_env, VERSION);
|
||||
}
|
||||
|
||||
fn host_open_file(plugin_env: &PluginEnv) {
|
||||
|
|
@ -397,7 +397,7 @@ pub fn wasi_write_string(wasi_env: &WasiEnv, buf: &str) {
|
|||
writeln!(wasi_file, "{}\r", buf).unwrap();
|
||||
}
|
||||
|
||||
pub fn wasi_write_object(wasi_env: &WasiEnv, object: &impl Serialize) {
|
||||
pub fn wasi_write_object(wasi_env: &WasiEnv, object: &(impl Serialize + ?Sized)) {
|
||||
wasi_write_string(wasi_env, &serde_json::to_string(&object).unwrap());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue