From 123f11854c101077d7ddbc37aad6f15e77e70b90 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 11 Sep 2024 15:50:05 +0200 Subject: [PATCH] fix(lua): normalize workspace method names no _buffer --- src/ffi/lua.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ffi/lua.rs b/src/ffi/lua.rs index e75596a..0b62c26 100644 --- a/src/ffi/lua.rs +++ b/src/ffi/lua.rs @@ -254,19 +254,19 @@ impl LuaUserData for CodempClient { impl LuaUserData for CodempWorkspace { fn add_methods>(methods: &mut M) { methods.add_meta_method(LuaMetaMethod::ToString, |_, this, ()| Ok(format!("{:?}", this))); - methods.add_method("create_buffer", |_, this, (name,):(String,)| + methods.add_method("create", |_, this, (name,):(String,)| a_sync! { this => Ok(this.create(&name).await?) } ); - methods.add_method("attach_buffer", |_, this, (name,):(String,)| + methods.add_method("attach", |_, this, (name,):(String,)| a_sync! { this => Ok(this.attach(&name).await?) } ); - methods.add_method("detach_buffer", |_, this, (name,):(String,)| + methods.add_method("detach", |_, this, (name,):(String,)| Ok(matches!(this.detach(&name), DetachResult::Detaching | DetachResult::AlreadyDetached)) ); - methods.add_method("delete_buffer", |_, this, (name,):(String,)| + methods.add_method("delete", |_, this, (name,):(String,)| a_sync! { this => Ok(this.delete(&name).await?) } );