Skip to content

Commit

Permalink
Actually use unchecked deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort authored and theduke committed Jun 1, 2023
1 parent 495b98b commit 9690c86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/api/src/sys/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ impl Module {
bytes: impl IntoBytes,
) -> Result<Self, DeserializeError> {
let bytes = bytes.into_bytes();
let artifact = engine.as_engine_ref().engine().0.deserialize(&bytes)?;
let artifact = engine
.as_engine_ref()
.engine()
.0
.deserialize_unchecked(&bytes)?;
Ok(Self::from_artifact(artifact))
}

Expand All @@ -96,7 +100,7 @@ impl Module {
.as_engine_ref()
.engine()
.0
.deserialize_from_file(path.as_ref())?;
.deserialize_from_file_unchecked(path.as_ref())?;
Ok(Self::from_artifact(artifact))
}

Expand Down

0 comments on commit 9690c86

Please sign in to comment.