Improve Instruction::new deprecation warning (#15896)

(cherry picked from commit 8567b41d5f)

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
mergify[bot]
2021-03-16 05:18:31 +00:00
committed by GitHub
parent 87963764fa
commit fddba08571

View File

@ -216,7 +216,7 @@ pub struct Instruction {
impl Instruction {
#[deprecated(
since = "1.6.0",
note = "Please use another `Instruction constructor instead"
note = "Please use another Instruction constructor instead, such as `Instruction::new_with_bincode`"
)]
pub fn new<T: Serialize>(program_id: Pubkey, data: &T, accounts: Vec<AccountMeta>) -> Self {
Self::new_with_bincode(program_id, data, accounts)