diff --git a/examples/src/main.rs b/examples/src/main.rs index 7ee695629..cd1433bca 100644 --- a/examples/src/main.rs +++ b/examples/src/main.rs @@ -112,7 +112,7 @@ fn main() { } #[cfg(not(feature = "std"))] - println!("Proof security: {} bits", conjectured_security_level); + println!("Proof security: {} bits", conjectured_security_level.0); #[cfg(feature = "std")] println!("Proof hash: {}", hex::encode(blake3::hash(&proof_bytes).as_bytes())); diff --git a/utils/core/src/serde/byte_writer.rs b/utils/core/src/serde/byte_writer.rs index e9db5899c..48e1fb946 100644 --- a/utils/core/src/serde/byte_writer.rs +++ b/utils/core/src/serde/byte_writer.rs @@ -85,7 +85,7 @@ pub trait ByteWriter: Sized { self.write_u8(0); self.write(value.to_le_bytes()); } else { - let encoded_bytes = ((value << 1 | 1) << (length - 1)).to_le_bytes(); + let encoded_bytes = (((value << 1) | 1) << (length - 1)).to_le_bytes(); self.write_bytes(&encoded_bytes[..length]); } }