removed unneeded napi result

This commit is contained in:
frelodev 2024-02-12 19:19:39 +01:00
parent 1cbfc49df1
commit d0d37b1b71
2 changed files with 6 additions and 6 deletions

View file

@ -79,8 +79,8 @@ impl JsBufferController {
#[napi] #[napi]
pub fn content(&self) -> napi::Result<String> { pub fn content(&self) -> String {
Ok(self.0.content()) self.0.content()
} }

View file

@ -33,13 +33,13 @@ impl JsCodempClient {
#[napi] #[napi]
/// get workspace with given id, if it exists /// get workspace with given id, if it exists
pub async fn get_workspace(&self, workspace: String) -> napi::Result<Option<JsWorkspace>> { pub async fn get_workspace(&self, workspace: String) -> Option<JsWorkspace> {
Ok(self.0.read().await.get_workspace(&workspace).map(|w| JsWorkspace::from(w))) self.0.read().await.get_workspace(&workspace).map(|w| JsWorkspace::from(w))
} }
#[napi] #[napi]
/// return current sessions's user id /// return current sessions's user id
pub async fn user_id(&self) -> napi::Result<String> { pub async fn user_id(&self) -> String {
Ok(self.0.read().await.user_id().to_string()) self.0.read().await.user_id().to_string()
} }
} }