From be38d1eebe9e21f86b00dee518556c5ff6ec826c Mon Sep 17 00:00:00 2001 From: Kasey White Date: Sun, 24 Jul 2022 19:56:00 -0400 Subject: [PATCH] fix fmt error --- crates/uplc/src/flat.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/uplc/src/flat.rs b/crates/uplc/src/flat.rs index 1701774f..2e7f9e77 100644 --- a/crates/uplc/src/flat.rs +++ b/crates/uplc/src/flat.rs @@ -160,14 +160,15 @@ impl Encode for &Constant { match self { // Integers are typically smaller so we save space // by encoding them in 7 bits and this allows it to be byte alignment agnostic. + // Strings and bytestrings span multiple bytes so using bytestring is + // the most effective encoding. + // i.e. A 17 or greater length byte array loses efficiency being encoded as + // a unsigned integer instead of a byte array Constant::Integer(i) => { encode_constant(0, e)?; i.encode(e)?; } - // Strings and bytestrings span multiple bytes so using bytestring is - // the most effective encoding. - // i.e. A 17 or greater length byte array loses efficiency being encoded as - // a unsigned integer instead of a byte array + Constant::ByteString(bytes) => { encode_constant(1, e)?; bytes.encode(e)?;