Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry committed Aug 9, 2021
1 parent 5fefb81 commit fa2df7e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sdk/program/src/message/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,18 @@ impl<'de> Deserialize<'de> for VersionedMessage {
pub instructions: Vec<CompiledInstruction>,
}

let message: RemainingLegacyMessage = seq.next_element()?.ok_or_else(|| {
// will never happen since tuple length is always 2
de::Error::invalid_length(1, &self)
})?;
let message: RemainingLegacyMessage =
seq.next_element()?.ok_or_else(|| {
// will never happen since tuple length is always 2
de::Error::invalid_length(1, &self)
})?;

Ok(VersionedMessage::Legacy(Message {
header: MessageHeader {
num_required_signatures,
num_readonly_signed_accounts: message.num_readonly_signed_accounts,
num_readonly_unsigned_accounts: message.num_readonly_unsigned_accounts,
num_readonly_unsigned_accounts: message
.num_readonly_unsigned_accounts,
},
account_keys: message.account_keys,
recent_blockhash: message.recent_blockhash,
Expand Down

0 comments on commit fa2df7e

Please sign in to comment.