diff --git a/lang/src/lib.rs b/lang/src/lib.rs index dcb1ab7061..963759c208 100644 --- a/lang/src/lib.rs +++ b/lang/src/lib.rs @@ -272,7 +272,8 @@ pub trait InstructionData: Discriminator + AnchorSerialize { } /// Clears `vec` and writes instruction data to it /// - /// We use a Vec here because of the additional flexibility + /// We use a Vec here because of the additional flexibility of re-allocation (only if necessary), + /// and because the data field in `Instruction` expects a `Vec`. fn write_to(&self, mut vec: &mut Vec) { // Clear vector vec.clear();