We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6953a9d commit 1836839Copy full SHA for 1836839
1 file changed
rust/sealevel/programs/ism/composite-ism/src/instruction.rs
@@ -81,17 +81,11 @@ pub enum Instruction {
81
}
82
83
impl DiscriminatorData for Instruction {
84
+ // `DiscriminatorDecode::decode` (blanket impl) checks this prefix before
85
+ // deserializing, so every call to `Instruction::decode` is discriminator-guarded.
86
const DISCRIMINATOR: [u8; Self::DISCRIMINATOR_LENGTH] = PROGRAM_INSTRUCTION_DISCRIMINATOR;
87
88
-impl TryFrom<&[u8]> for Instruction {
- type Error = ProgramError;
89
-
90
- fn try_from(data: &[u8]) -> Result<Self, Self::Error> {
91
- Self::try_from_slice(data).map_err(|_| ProgramError::InvalidInstructionData)
92
- }
93
-}
94
95
/// Creates an Initialize instruction.
96
pub fn initialize_instruction(
97
program_id: Pubkey,
0 commit comments