Skip to content

Commit

Permalink
Update program/rust/src/accounts/price.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Pavel Strakhov <[email protected]>
  • Loading branch information
guibescos and Riateche authored Jul 24, 2024
1 parent 9d58ce6 commit b2320d9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions program/rust/src/accounts/price.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ impl PythOracleSerialize for TwapMessage {
impl PythOracleSerialize for PublisherStakeCapsMessage {
fn to_bytes(self) -> Vec<u8> {
const DISCRIMINATOR: u8 = 2;
let mut result: Vec<u8> = 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::<u16>::try_into(self.caps.as_ref().len())
Expand Down

0 comments on commit b2320d9

Please sign in to comment.