فهرست منبع

Rust Renderer: add clippy ignore for arithmetic (#514)

* renderer-rust: add clippy ignore for arithmetic

* add changeset
Joe C 8 ماه پیش
والد
کامیت
d5b01d665c
28فایلهای تغییر یافته به همراه57 افزوده شده و 0 حذف شده
  1. 5 0
      .changeset/tender-tires-bet.md
  2. 2 0
      packages/renderers-rust/e2e/anchor/src/generated/instructions/create_guard.rs
  3. 2 0
      packages/renderers-rust/e2e/anchor/src/generated/instructions/execute.rs
  4. 2 0
      packages/renderers-rust/e2e/anchor/src/generated/instructions/initialize.rs
  5. 2 0
      packages/renderers-rust/e2e/anchor/src/generated/instructions/update_guard.rs
  6. 2 0
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction1.rs
  7. 2 0
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction2.rs
  8. 2 0
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction3.rs
  9. 2 0
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction4.rs
  10. 2 0
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction5.rs
  11. 2 0
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction6.rs
  12. 2 0
      packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction7.rs
  13. 2 0
      packages/renderers-rust/e2e/memo/src/generated/instructions/add_memo.rs
  14. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/advance_nonce_account.rs
  15. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/allocate.rs
  16. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/allocate_with_seed.rs
  17. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/assign.rs
  18. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/assign_with_seed.rs
  19. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/authorize_nonce_account.rs
  20. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/create_account.rs
  21. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/create_account_with_seed.rs
  22. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/initialize_nonce_account.rs
  23. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol.rs
  24. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol_with_seed.rs
  25. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/upgrade_nonce_account.rs
  26. 2 0
      packages/renderers-rust/e2e/system/src/generated/instructions/withdraw_nonce_account.rs
  27. 1 0
      packages/renderers-rust/public/templates/instructionsCpiPage.njk
  28. 1 0
      packages/renderers-rust/public/templates/instructionsPage.njk

+ 5 - 0
.changeset/tender-tires-bet.md

@@ -0,0 +1,5 @@
+---
+'@codama/renderers-rust': patch
+---
+
+Add `#[allow(clippy::arithmetic_side_effects)]` to the list of clippy ignores on top of various instruction methods generated by the Rust renderer."

+ 2 - 0
packages/renderers-rust/e2e/anchor/src/generated/instructions/create_guard.rs

@@ -38,6 +38,7 @@ impl CreateGuard {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -378,6 +379,7 @@ impl<'a, 'b> CreateGuardCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/anchor/src/generated/instructions/execute.rs

@@ -33,6 +33,7 @@ impl Execute {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -305,6 +306,7 @@ impl<'a, 'b> ExecuteCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/anchor/src/generated/instructions/initialize.rs

@@ -28,6 +28,7 @@ impl Initialize {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -257,6 +258,7 @@ impl<'a, 'b> InitializeCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/anchor/src/generated/instructions/update_guard.rs

@@ -34,6 +34,7 @@ impl UpdateGuard {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -306,6 +307,7 @@ impl<'a, 'b> UpdateGuardCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction1.rs

@@ -16,6 +16,7 @@ impl Instruction1 {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -120,6 +121,7 @@ impl<'a, 'b> Instruction1Cpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction2.rs

@@ -16,6 +16,7 @@ impl Instruction2 {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -120,6 +121,7 @@ impl<'a, 'b> Instruction2Cpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction3.rs

@@ -16,6 +16,7 @@ impl Instruction3 {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -122,6 +123,7 @@ impl<'a, 'b> Instruction3Cpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction4.rs

@@ -19,6 +19,7 @@ impl Instruction4 {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -149,6 +150,7 @@ impl<'a, 'b> Instruction4Cpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction5.rs

@@ -19,6 +19,7 @@ impl Instruction5 {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -150,6 +151,7 @@ impl<'a, 'b> Instruction5Cpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction6.rs

@@ -18,6 +18,7 @@ impl Instruction6 {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -148,6 +149,7 @@ impl<'a, 'b> Instruction6Cpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/dummy/src/generated/instructions/instruction7.rs

@@ -18,6 +18,7 @@ impl Instruction7 {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -155,6 +156,7 @@ impl<'a, 'b> Instruction7Cpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/memo/src/generated/instructions/add_memo.rs

@@ -20,6 +20,7 @@ impl AddMemo {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -150,6 +151,7 @@ impl<'a, 'b> AddMemoCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/advance_nonce_account.rs

@@ -22,6 +22,7 @@ impl AdvanceNonceAccount {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -197,6 +198,7 @@ impl<'a, 'b> AdvanceNonceAccountCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/allocate.rs

@@ -21,6 +21,7 @@ impl Allocate {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -175,6 +176,7 @@ impl<'a, 'b> AllocateCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/allocate_with_seed.rs

@@ -24,6 +24,7 @@ impl AllocateWithSeed {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -222,6 +223,7 @@ impl<'a, 'b> AllocateWithSeedCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/assign.rs

@@ -22,6 +22,7 @@ impl Assign {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -179,6 +180,7 @@ impl<'a, 'b> AssignCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/assign_with_seed.rs

@@ -24,6 +24,7 @@ impl AssignWithSeed {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -214,6 +215,7 @@ impl<'a, 'b> AssignWithSeedCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/authorize_nonce_account.rs

@@ -24,6 +24,7 @@ impl AuthorizeNonceAccount {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -201,6 +202,7 @@ impl<'a, 'b> AuthorizeNonceAccountCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/create_account.rs

@@ -24,6 +24,7 @@ impl CreateAccount {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -213,6 +214,7 @@ impl<'a, 'b> CreateAccountCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/create_account_with_seed.rs

@@ -26,6 +26,7 @@ impl CreateAccountWithSeed {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -248,6 +249,7 @@ impl<'a, 'b> CreateAccountWithSeedCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/initialize_nonce_account.rs

@@ -26,6 +26,7 @@ impl InitializeNonceAccount {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -226,6 +227,7 @@ impl<'a, 'b> InitializeNonceAccountCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol.rs

@@ -23,6 +23,7 @@ impl TransferSol {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -194,6 +195,7 @@ impl<'a, 'b> TransferSolCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/transfer_sol_with_seed.rs

@@ -26,6 +26,7 @@ impl TransferSolWithSeed {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -230,6 +231,7 @@ impl<'a, 'b> TransferSolWithSeedCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/upgrade_nonce_account.rs

@@ -18,6 +18,7 @@ impl UpgradeNonceAccount {
     pub fn instruction(&self) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(&[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -150,6 +151,7 @@ impl<'a, 'b> UpgradeNonceAccountCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 2 - 0
packages/renderers-rust/e2e/system/src/generated/instructions/withdraw_nonce_account.rs

@@ -29,6 +29,7 @@ impl WithdrawNonceAccount {
     ) -> solana_program::instruction::Instruction {
         self.instruction_with_remaining_accounts(args, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::vec_init_then_push)]
     pub fn instruction_with_remaining_accounts(
         &self,
@@ -271,6 +272,7 @@ impl<'a, 'b> WithdrawNonceAccountCpi<'a, 'b> {
     ) -> solana_program::entrypoint::ProgramResult {
         self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
     }
+    #[allow(clippy::arithmetic_side_effects)]
     #[allow(clippy::clone_on_copy)]
     #[allow(clippy::vec_init_then_push)]
     pub fn invoke_signed_with_remaining_accounts(

+ 1 - 0
packages/renderers-rust/public/templates/instructionsCpiPage.njk

@@ -80,6 +80,7 @@ impl<'a, 'b> {{ instruction.name | pascalCase }}Cpi<'a, 'b> {
   pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> solana_program::entrypoint::ProgramResult {
     self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
   }
+  #[allow(clippy::arithmetic_side_effects)]
   #[allow(clippy::clone_on_copy)]
   #[allow(clippy::vec_init_then_push)]
   pub fn invoke_signed_with_remaining_accounts(

+ 1 - 0
packages/renderers-rust/public/templates/instructionsPage.njk

@@ -31,6 +31,7 @@ impl {{ instruction.name | pascalCase }} {
   pub fn instruction(&self{{ ', args: ' + instruction.name | pascalCase + 'InstructionArgs' if hasArgs }}) -> solana_program::instruction::Instruction {
     self.instruction_with_remaining_accounts({{ 'args, ' if hasArgs }}&[])
   }
+  #[allow(clippy::arithmetic_side_effects)]
   #[allow(clippy::vec_init_then_push)]
   pub fn instruction_with_remaining_accounts(&self{{ ', args: ' + instruction.name | pascalCase + 'InstructionArgs' if hasArgs }}, remaining_accounts: &[solana_program::instruction::AccountMeta]) -> solana_program::instruction::Instruction {
     let mut accounts = Vec::with_capacity({{ instruction.accounts.length + '+' if instruction.accounts.length > 0}} remaining_accounts.len());