fix(js): remove unneded result wraps

This commit is contained in:
əlemi 2024-09-25 23:00:01 +02:00
parent 79f063123e
commit 4191fc2257
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 5 additions and 6 deletions

View file

@ -27,15 +27,14 @@ impl BufferController {
} }
#[napi(js_name = "clear_callback")] #[napi(js_name = "clear_callback")]
pub fn js_clear_callback(&self) -> napi::Result<()> { pub fn js_clear_callback(&self) -> () {
self.clear_callback(); self.clear_callback();
Ok(())
} }
#[napi(js_name = "get_path")] #[napi(js_name = "get_path")]
pub fn js_path(&self) -> napi::Result<&str> { pub fn js_path(&self) -> &str {
Ok(self.path()) self.path()
} }
#[napi(js_name = "poll")] #[napi(js_name = "poll")]

View file

@ -41,8 +41,8 @@ impl Client {
#[napi(js_name = "leave_workspace")] #[napi(js_name = "leave_workspace")]
/// leave workspace and disconnect, returns true if workspace was active /// leave workspace and disconnect, returns true if workspace was active
pub async fn js_leave_workspace(&self, workspace: String) -> napi::Result<bool> { pub async fn js_leave_workspace(&self, workspace: String) -> bool {
Ok(self.leave_workspace(&workspace)) self.leave_workspace(&workspace)
} }
#[napi(js_name = "get_workspace")] #[napi(js_name = "get_workspace")]