From 4017e5e13b980132e10d1937e365b719b03ce884 Mon Sep 17 00:00:00 2001 From: Armani Ferrante Date: Tue, 22 Feb 2022 10:46:49 -0500 Subject: [PATCH] remove comments that are no longer relevant --- lang/src/accounts/account.rs | 7 ------- lang/src/accounts/account_loader.rs | 7 ------- lang/src/accounts/loader.rs | 7 ------- lang/src/accounts/program_account.rs | 7 ------- 4 files changed, 28 deletions(-) diff --git a/lang/src/accounts/account.rs b/lang/src/accounts/account.rs index 20c24338..c8ca3937 100644 --- a/lang/src/accounts/account.rs +++ b/lang/src/accounts/account.rs @@ -338,13 +338,6 @@ impl<'info, T: AccountSerialize + AccountDeserialize + Owner + Clone> AccountsEx } } -/// This function is for INTERNAL USE ONLY. -/// Do NOT use this function in a program. -/// Manual closing of `Account<'info, T>` types is NOT supported. -/// -/// Details: Using `close` with `Account<'info, T>` is not safe because -/// it requires the `mut` constraint but for that type the constraint -/// overwrites the "closed account" discriminator at the end of the instruction. impl<'info, T: AccountSerialize + AccountDeserialize + Owner + Clone> AccountsClose<'info> for Account<'info, T> { diff --git a/lang/src/accounts/account_loader.rs b/lang/src/accounts/account_loader.rs index 85a71bf4..171c4bfe 100644 --- a/lang/src/accounts/account_loader.rs +++ b/lang/src/accounts/account_loader.rs @@ -193,13 +193,6 @@ impl<'info, T: ZeroCopy + Owner> AccountsExit<'info> for AccountLoader<'info, T> } } -/// This function is for INTERNAL USE ONLY. -/// Do NOT use this function in a program. -/// Manual closing of `AccountLoader<'info, T>` types is NOT supported. -/// -/// Details: Using `close` with `AccountLoader<'info, T>` is not safe because -/// it requires the `mut` constraint but for that type the constraint -/// overwrites the "closed account" discriminator at the end of the instruction. impl<'info, T: ZeroCopy + Owner> AccountsClose<'info> for AccountLoader<'info, T> { fn close(&self, sol_destination: AccountInfo<'info>) -> Result<()> { crate::common::close(self.to_account_info(), sol_destination) diff --git a/lang/src/accounts/loader.rs b/lang/src/accounts/loader.rs index ed3dcc30..216f7150 100644 --- a/lang/src/accounts/loader.rs +++ b/lang/src/accounts/loader.rs @@ -139,13 +139,6 @@ impl<'info, T: ZeroCopy> AccountsExit<'info> for Loader<'info, T> { } } -/// This function is for INTERNAL USE ONLY. -/// Do NOT use this function in a program. -/// Manual closing of `Loader<'info, T>` types is NOT supported. -/// -/// Details: Using `close` with `Loader<'info, T>` is not safe because -/// it requires the `mut` constraint but for that type the constraint -/// overwrites the "closed account" discriminator at the end of the instruction. #[allow(deprecated)] impl<'info, T: ZeroCopy> AccountsClose<'info> for Loader<'info, T> { fn close(&self, sol_destination: AccountInfo<'info>) -> Result<()> { diff --git a/lang/src/accounts/program_account.rs b/lang/src/accounts/program_account.rs index bd09bdd3..dce19b35 100644 --- a/lang/src/accounts/program_account.rs +++ b/lang/src/accounts/program_account.rs @@ -99,13 +99,6 @@ impl<'info, T: AccountSerialize + AccountDeserialize + Clone> AccountsExit<'info } } -/// This function is for INTERNAL USE ONLY. -/// Do NOT use this function in a program. -/// Manual closing of `ProgramAccount<'info, T>` types is NOT supported. -/// -/// Details: Using `close` with `ProgramAccount<'info, T>` is not safe because -/// it requires the `mut` constraint but for that type the constraint -/// overwrites the "closed account" discriminator at the end of the instruction. #[allow(deprecated)] impl<'info, T: AccountSerialize + AccountDeserialize + Clone> AccountsClose<'info> for ProgramAccount<'info, T>