Skip to content

Commit

Permalink
fix: Wasm compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Jan 2, 2024
1 parent ba79220 commit b53805e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wnfs-wasm/src/fs/private/access_key.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::fs::utils::error;
use crate::fs::{utils::error, JsResult};
use wasm_bindgen::prelude::wasm_bindgen;
use wnfs::private::AccessKey as WnfsAccessKey;

Expand Down Expand Up @@ -64,7 +64,7 @@ impl AccessKey {

/// Deserialize an AccessKey previously generated from `into_bytes`.
#[wasm_bindgen(js_name = "fromBytes")]
pub fn from_bytes(bytes: &[u8]) -> JsResult<Self> {
pub fn from_bytes(bytes: &[u8]) -> JsResult<AccessKey> {
let access_key = WnfsAccessKey::parse(bytes).map_err(error("Couldn't parse access key"))?;
Ok(Self(access_key))
}
Expand Down

0 comments on commit b53805e

Please sign in to comment.