Skip to content

Commit

Permalink
Merge pull request #4040 from wasmerio/fix_remove_deserialisation_err…
Browse files Browse the repository at this point in the history
…_message

Removed error message when a deserializzation error occurs in Artifact
  • Loading branch information
ptitSeb authored Jun 27, 2023
2 parents b7b3de6 + bb05edf commit 9bf3980
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/compiler/src/engine/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,12 @@ impl Artifact {
Ok(v) => {
return Ok(v);
}
Err(err) => {
eprintln!("Could not deserialize as static object: {}", err);
Err(_) => {
return Err(DeserializeError::Incompatible(
"The provided bytes are not wasmer-universal".to_string(),
));
}
}
return Err(DeserializeError::Incompatible(
"The provided bytes are not wasmer-universal".to_string(),
));
}

let bytes = Self::get_byte_slice(bytes, ArtifactBuild::MAGIC_HEADER.len(), bytes.len())?;
Expand Down Expand Up @@ -198,13 +197,12 @@ impl Artifact {
Ok(v) => {
return Ok(v);
}
Err(err) => {
eprintln!("Could not deserialize as static object: {}", err);
Err(_) => {
return Err(DeserializeError::Incompatible(
"The provided bytes are not wasmer-universal".to_string(),
));
}
}
return Err(DeserializeError::Incompatible(
"The provided bytes are not wasmer-universal".to_string(),
));
}

let bytes = Self::get_byte_slice(bytes, ArtifactBuild::MAGIC_HEADER.len(), bytes.len())?;
Expand Down

0 comments on commit 9bf3980

Please sign in to comment.