From 56d922e0f98b2027cbea5fc2efa2258133bab9c2 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sat, 11 Apr 2020 00:11:10 -0400 Subject: [PATCH] dont always length prefix --- prost-amino-derive/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prost-amino-derive/src/lib.rs b/prost-amino-derive/src/lib.rs index 75f68f2..8954286 100644 --- a/prost-amino-derive/src/lib.rs +++ b/prost-amino-derive/src/lib.rs @@ -257,14 +257,14 @@ fn try_message(input: TokenStream) -> Result { impl _prost::Message for #ident { #[allow(unused_variables)] fn encode_raw(&self, buf: &mut B) where B: _prost::bytes::BufMut { - if #is_registered { + /*if #is_registered { // TODO: in go-amino this only get length-prefixed if MarhsalBinary is used // opposed to MarshalBinaryBare let len = 4 #(+ #encoded_len2)*; _prost::encoding::encode_varint(len as u64, buf); } else { // not length prefixed! - } + }*/ #comp_prefix #(#encode)* }