mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-24 16:14:48 +01:00
fix(js): remove unneded result wraps
This commit is contained in:
parent
79f063123e
commit
4191fc2257
2 changed files with 5 additions and 6 deletions
|
@ -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")]
|
||||||
|
|
|
@ -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")]
|
||||||
|
|
Loading…
Reference in a new issue