Browse Source

clippy: Deny integer arithmetic, add allows where needed (#3606)

Jon Cinque 3 years ago
parent
commit
f9e12f40f6
2 changed files with 7 additions and 6 deletions
  1. 1 0
      program/src/lib.rs
  2. 6 6
      program/tests/close_account.rs

+ 1 - 0
program/src/lib.rs

@@ -1,3 +1,4 @@
+#![allow(clippy::integer_arithmetic)]
 #![deny(missing_docs)]
 #![cfg_attr(not(test), forbid(unsafe_code))]
 

+ 6 - 6
program/tests/close_account.rs

@@ -36,10 +36,10 @@ async fn setup_mint_and_account(
                 &mint.pubkey(),
                 rent.minimum_balance(space),
                 space as u64,
-                &token_program_id,
+                token_program_id,
             ),
             instruction::initialize_mint(
-                &token_program_id,
+                token_program_id,
                 &mint.pubkey(),
                 &mint_authority_pubkey,
                 None,
@@ -60,18 +60,18 @@ async fn setup_mint_and_account(
                 &token_account.pubkey(),
                 rent.minimum_balance(space),
                 space as u64,
-                &token_program_id,
+                token_program_id,
             ),
             instruction::initialize_account(
-                &token_program_id,
+                token_program_id,
                 &token_account.pubkey(),
                 &mint.pubkey(),
-                &owner,
+                owner,
             )
             .unwrap(),
         ],
         Some(&context.payer.pubkey()),
-        &[&context.payer, &token_account],
+        &[&context.payer, token_account],
         context.last_blockhash,
     );
     context.banks_client.process_transaction(tx).await.unwrap();