Skip to content

Commit

Permalink
fix: encode bytebuf for SmartModuleWasm
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Oct 27, 2022
1 parent 44b4643 commit 44ab15b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/fluvio-controlplane-metadata/src/smartmodule/spec.rs
Expand Up @@ -124,8 +124,12 @@ impl std::fmt::Debug for SmartModuleWasm {
impl SmartModuleWasm {
/// Create SmartModule from compressed Gzip format
pub fn from_compressed_gzip(payload: Vec<u8>) -> Self {
let bytes = ByteBuf::default();

bytes.encode(&mut payload.clone(), 0).unwrap();

SmartModuleWasm {
payload: ByteBuf::from(payload),
payload: bytes,
format: SmartModuleWasmFormat::Binary,
}
}
Expand Down

0 comments on commit 44ab15b

Please sign in to comment.