Skip to content

Commit

Permalink
fix: make match statement explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Jul 24, 2024
1 parent 2ae88e1 commit c33922f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion target_chains/solana/programs/pyth-push-oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub mod pyth_push_oracle {
.map_err(|_| PushOracleError::DeserializeMessageFailed)?;
let next_timestamp = match message {
Message::PriceFeedMessage(price_feed_message) => price_feed_message.publish_time,
_ => {
Message::TwapMessage(_) | Message::PublisherStakeCapsMessage(_) => {
return err!(PushOracleError::UnsupportedMessageType);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ fn post_price_update_from_vaa<'info>(
price_update_account.price_message = price_feed_message;
price_update_account.posted_slot = Clock::get()?.slot;
}
_ => {
Message::TwapMessage(_) | Message::PublisherStakeCapsMessage(_) => {
return err!(ReceiverError::UnsupportedMessageType);
}
}
Expand Down

0 comments on commit c33922f

Please sign in to comment.