Skip to content

Commit 32f80f7

Browse files
authored
Lint files (#77)
We haven't been running the linter, this PR is the application of clippy and fmt via `pnpm p-token:lint`. Changes have not been propagated to `program` (spl token) yet @Stevengre we might need to work together to achieve that. I have run these concrete tests: - `pnpm p-token:build` - `pnpm p-token:test` - `pnpm programs:test:pinocchio:rv` I have run these proofs (chosen as they pass and after not too long): - [x] test_process_approve - [x] test_process_approve_checked - [x] test_process_transfer - [x] test_process_mint_to - [x] test_process_burn - [x] test_process_close_account - [x] test_process_transfer_checked - [x] test_process_burn_checked - [x] test_process_revoke - [x] test_process_freeze_account - [x] test_process_thaw_account - [x] test_process_mint_to_checked - [x] test_process_sync_native - [x] test_process_get_account_data_size - [x] test_process_initialize_immutable_owner NOTE: I saw flakeyness on `test_process_sync_native` getting and Kore RPC error `RuntimeError: Empty response received` - I have since run the proof under the same conditions again and it is passing, I am not sure if it was my local environment but I will record this here.
1 parent 7d26c82 commit 32f80f7

16 files changed

+158
-146
lines changed

p-token/src/entrypoint-runtime-verification.rs

Lines changed: 141 additions & 129 deletions
Large diffs are not rendered by default.

p-token/tests/approve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async fn approve() {
8585
}
8686

8787
// #[tokio::test]
88-
async fn approve_invalid_src() {
88+
async fn _approve_invalid_src() {
8989
let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
9090
.start_with_context()
9191
.await;

p-token/tests/approve_checked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async fn approve_checked() {
8787
}
8888

8989
// #[tokio::test]
90-
async fn approve_checked_invalid_src() {
90+
async fn _approve_checked_invalid_src() {
9191
let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
9292
.start_with_context()
9393
.await;

p-token/tests/burn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async fn burn() {
7575
}
7676

7777
// #[tokio::test]
78-
async fn burn_invalid_source() {
78+
async fn _burn_invalid_source() {
7979
let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
8080
.start_with_context()
8181
.await;

p-token/tests/burn_checked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async fn burn_checked() {
8282
}
8383

8484
// #[tokio::test]
85-
async fn burn_checked_invalid_source() {
85+
async fn _burn_checked_invalid_source() {
8686
let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
8787
.start_with_context()
8888
.await;

p-token/tests/close_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ async fn close_same_accounts() {
117117
}
118118

119119
// #[tokio::test]
120-
async fn close_invalid_source() {
120+
async fn _close_invalid_source() {
121121
let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
122122
.start_with_context()
123123
.await;

p-token/tests/freeze_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async fn freeze_account() {
7272
}
7373

7474
// #[tokio::test]
75-
async fn freeze_account_invalid_source() {
75+
async fn _freeze_account_invalid_source() {
7676
let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
7777
.start_with_context()
7878
.await;

p-token/tests/initialize_multisig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async fn initialize_multisig() {
7676
}
7777

7878
// #[tokio::test]
79-
async fn initialize_multisig_invalid_multisig() {
79+
async fn _initialize_multisig_invalid_multisig() {
8080
let context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
8181
.start_with_context()
8282
.await;

p-token/tests/initialize_multisig2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async fn initialize_multisig2() {
7676
}
7777

7878
// #[tokio::test]
79-
async fn initialize_multisig2_invalid_multisig() {
79+
async fn _initialize_multisig2_invalid_multisig() {
8080
let context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
8181
.start_with_context()
8282
.await;

p-token/tests/mint_to.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async fn mint_to() {
7070
}
7171

7272
// #[tokio::test]
73-
async fn mint_to_invalid_destination() {
73+
async fn _mint_to_invalid_destination() {
7474
let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None)
7575
.start_with_context()
7676
.await;

0 commit comments

Comments
 (0)