Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

chore: fix some comments #6588

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion single-pool/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ fn pool_source_group() -> ArgGroup<'static> {
pub fn parse_address(path: &str, name: &str) -> Result<Pubkey, String> {
if is_valid_pubkey(path).is_ok() {
// this all is ugly but safe
// wallet_manager doesnt need to be shared, it just saves cycles to cache it
// wallet_manager doesn't need to be shared, it just saves cycles to cache it
// and the only way argmatches default fails with an unchecked lookup is in the
// prompt branch which seems unlikely to ever be used for pubkeys
// the usb lookup in signer_from_path_with_config is safe
Expand Down
2 changes: 1 addition & 1 deletion single-pool/program/tests/helpers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(dead_code)] // needed because cargo doesnt understand test usage
#![allow(dead_code)] // needed because cargo doesn't understand test usage

use {
solana_program_test::*,
Expand Down
2 changes: 1 addition & 1 deletion single-pool/program/tests/helpers/stake.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(dead_code)] // needed because cargo doesnt understand test usage
#![allow(dead_code)] // needed because cargo doesn't understand test usage

use {
crate::get_account,
Expand Down
10 changes: 5 additions & 5 deletions token/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ async fn command_create_multisig(
),
);

// default is safe here because create_multisig doesnt use it
// default is safe here because create_multisig doesn't use it
let token = token_client_from_config(config, &Pubkey::default(), None)?;

let res = token
Expand Down Expand Up @@ -1127,7 +1127,7 @@ async fn command_authorize(

(mint_pubkey, previous_authority)
} else {
// default is safe here because authorize doesnt use it
// default is safe here because authorize doesn't use it
(Pubkey::default(), None)
};

Expand Down Expand Up @@ -1347,7 +1347,7 @@ async fn command_transfer(
Add `--allow-non-system-account-recipient` to complete the transfer.".into());
}
}
// if it doesnt exist, it definitely isnt a token account!
// if it doesn't exist, it definitely isnt a token account!
// we gate transfer with a different flag
else if maybe_recipient_account_data.is_none() && allow_unfunded_recipient {
false
Expand Down Expand Up @@ -2047,7 +2047,7 @@ async fn command_revoke(

(source_state.base.mint, delegate)
} else {
// default is safe here because revoke doesnt use it
// default is safe here because revoke doesn't use it
(Pubkey::default(), delegate)
};

Expand Down Expand Up @@ -2118,7 +2118,7 @@ async fn command_close(

token
} else {
// default is safe here because close doesnt use it
// default is safe here because close doesn't use it
token_client_from_config(config, &Pubkey::default(), None)?
};

Expand Down
8 changes: 4 additions & 4 deletions token/program-2022-test/tests/cpi_guard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ async fn test_cpi_guard_transfer() {
let alice_state = token_obj.get_account_info(&alice.pubkey()).await.unwrap();
assert_eq!(alice_state.base.amount, amount);

// user-auth cpi transfer with cpi guard doesnt work
// user-auth cpi transfer with cpi guard doesn't work
let error = token_obj
.process_ixs(&[mk_transfer(alice.pubkey(), do_checked)], &[&alice])
.await
Expand Down Expand Up @@ -389,7 +389,7 @@ async fn test_cpi_guard_burn() {
let alice_state = token_obj.get_account_info(&alice.pubkey()).await.unwrap();
assert_eq!(alice_state.base.amount, amount);

// user-auth cpi burn with cpi guard doesnt work
// user-auth cpi burn with cpi guard doesn't work
let error = token_obj
.process_ixs(&[mk_burn(alice.pubkey(), do_checked)], &[&alice])
.await
Expand Down Expand Up @@ -504,7 +504,7 @@ async fn test_cpi_guard_approve() {
.await
.unwrap();

// approve doesnt work through cpi
// approve doesn't work through cpi
let error = token_obj
.process_ixs(&[mk_approve(do_checked)], &[&alice])
.await
Expand Down Expand Up @@ -737,7 +737,7 @@ async fn test_cpi_guard_set_authority() {
)
.unwrap();

// this wraps it or doesnt based on the test case
// this wraps it or doesn't based on the test case
let instruction = if do_in_cpi {
wrap_instruction(spl_instruction_padding::id(), token_instruction, vec![], 0).unwrap()
} else {
Expand Down
Loading