From bb05edf1266e2f5f4bef0103cdc1c70b3e18f564 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 27 Jun 2023 14:21:08 +0200 Subject: [PATCH] Removed error message when a deserializzation error occurs in Artifact --- lib/compiler/src/engine/artifact.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index 47e9e110c39..b134c5651e8 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -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())?; @@ -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())?;