mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-22 15:34:49 +01:00
other unneeded napi results
This commit is contained in:
parent
d0d37b1b71
commit
5c94ad483e
1 changed files with 8 additions and 8 deletions
|
@ -19,23 +19,23 @@ impl From<Arc<codemp::Workspace>> for JsWorkspace {
|
||||||
impl JsWorkspace {
|
impl JsWorkspace {
|
||||||
|
|
||||||
#[napi]
|
#[napi]
|
||||||
pub fn id(&self) -> napi::Result<String> {
|
pub fn id(&self) -> String {
|
||||||
Ok(self.0.id())
|
self.0.id()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[napi]
|
#[napi]
|
||||||
pub fn filetree(&self) -> napi::Result<Vec<String>> {
|
pub fn filetree(&self) -> Vec<String> {
|
||||||
Ok(self.0.filetree())
|
self.0.filetree()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[napi]
|
#[napi]
|
||||||
pub fn cursor(&self) -> napi::Result<JsCursorController> {
|
pub fn cursor(&self) -> JsCursorController {
|
||||||
Ok(JsCursorController::from(self.0.cursor()))
|
JsCursorController::from(self.0.cursor())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[napi]
|
#[napi]
|
||||||
pub fn buffer_by_name(&self, path: String) -> napi::Result<Option<JsBufferController>> {
|
pub fn buffer_by_name(&self, path: String) -> Option<JsBufferController> {
|
||||||
Ok(self.0.buffer_by_name(&path).map(|b| JsBufferController::from(b)))
|
self.0.buffer_by_name(&path).map(|b| JsBufferController::from(b))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[napi]
|
#[napi]
|
||||||
|
|
Loading…
Reference in a new issue