Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Dec 20, 2024
1 parent e3aa8f0 commit 64016f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 1 addition & 13 deletions src/lib/stable/stable_structures/stable_b_tree_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ export class StableBTreeMap<Key = any, Value = any> {
globalThis._azleIcStable.stableBTreeMapInit(memoryId);
}
}

isSerializable(keySerializable);
isSerializable(valueSerializable);
}

/**
Expand Down Expand Up @@ -62,6 +59,7 @@ export class StableBTreeMap<Key = any, Value = any> {
encodedKey
);
}

/**
* Retrieves the value stored at the provided key.
* @param key the location from which to retrieve.
Expand Down Expand Up @@ -321,13 +319,3 @@ export class StableBTreeMap<Key = any, Value = any> {
});
}
}

function isSerializable(obj: any): asserts obj is Serializable {
if (obj.toBytes === undefined) {
throw new Error(`value must have a toBytes method`);
}

if (obj.fromBytes === undefined) {
throw new Error(`value must have a fromBytes method`);
}
}

0 comments on commit 64016f1

Please sign in to comment.