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]
pub fn content(&self) -> napi::Result<String> {
Ok(self.0.content())
pub fn content(&self) -> String {
self.0.content()
}

View file

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