Skip to content

Commit

Permalink
Removed error message when a deserializzation error occurs in Artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Jun 27, 2023
1 parent b7b3de6 commit bb05edf
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 bb05edf

Please sign in to comment.