diff --git a/program/rust/src/accounts/price.rs b/program/rust/src/accounts/price.rs index 2587afc3..7ee41675 100644 --- a/program/rust/src/accounts/price.rs +++ b/program/rust/src/accounts/price.rs @@ -345,9 +345,7 @@ impl PythOracleSerialize for TwapMessage { impl PythOracleSerialize for PublisherStakeCapsMessage { fn to_bytes(self) -> Vec { const DISCRIMINATOR: u8 = 2; - let mut result: Vec = Vec::new(); - - result.extend_from_slice(&[DISCRIMINATOR]); + let mut result = vec![DISCRIMINATOR]; result.extend_from_slice(&self.publish_time.to_be_bytes()); result.extend_from_slice( &TryInto::::try_into(self.caps.as_ref().len())