fix(js): wrong argument, also remove Result<>

This commit is contained in:
əlemi 2024-09-25 22:56:07 +02:00
parent 95f800c762
commit 297762c0b4
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -2,11 +2,11 @@ use napi_derive::napi;
#[napi(js_name = "hash")]
pub fn js_hash(str : String) -> napi::Result<i64>{
Ok(crate::ext::hash(str))
pub fn js_hash(data: String) -> i64 {
crate::ext::hash(data)
}
#[napi(js_name = "version")]
pub fn js_version(str : String) -> napi::Result<String>{
Ok(crate::version())
pub fn js_version() -> String {
crate::version()
}